diff options
author | Kees Cook <keescook@chromium.org> | 2013-03-20 05:19:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-20 12:23:13 -0400 |
commit | 896ee0eee6261e30c3623be931c3f621428947df (patch) | |
tree | dfd1a4415493362da42b7899a2e0aee51d220498 /net/irda/af_irda.c | |
parent | fa90b077d72b4ea92706e86fdff7b5dca294caa3 (diff) | |
download | linux-896ee0eee6261e30c3623be931c3f621428947df.tar.bz2 |
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/af_irda.c')
-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; |