aboutsummaryrefslogtreecommitdiff
path: root/net/irda
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2013-03-20 05:19:24 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-20 12:23:13 -0400
commit896ee0eee6261e30c3623be931c3f621428947df (patch)
treedfd1a4415493362da42b7899a2e0aee51d220498 /net/irda
parentfa90b077d72b4ea92706e86fdff7b5dca294caa3 (diff)
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>
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/af_irda.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index d07e3a62644..d28e7f014cc 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;