diff options
author | Kees Cook <keescook@chromium.org> | 2013-03-20 06:19:24 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-20 17:23:13 +0100 |
commit | 896ee0eee6261e30c3623be931c3f621428947df (patch) | |
tree | dfd1a4415493362da42b7899a2e0aee51d220498 | |
parent | lpc_eth: fix error return code in lpc_eth_drv_probe() (diff) | |
download | linux-896ee0eee6261e30c3623be931c3f621428947df.tar.xz linux-896ee0eee6261e30c3623be931c3f621428947df.zip |
net/irda: add missing error path release_sock call
This makes sure that release_sock is called for all error conditions in
irda_getsockopt.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reported-by: Brad Spengler <spender@grsecurity.net>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/irda/af_irda.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index d07e3a626446..d28e7f014cc6 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -2583,8 +2583,10 @@ bed: NULL, NULL, NULL); /* Check if the we got some results */ - if (!self->cachedaddr) - return -EAGAIN; /* Didn't find any devices */ + if (!self->cachedaddr) { + err = -EAGAIN; /* Didn't find any devices */ + goto out; + } daddr = self->cachedaddr; /* Cleanup */ self->cachedaddr = 0; |