diff options
author | Kees Cook <keescook@chromium.org> | 2013-03-20 05:19:24 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 10:16:37 -0700 |
commit | c7eff9734960f1730b0373b2635e8e055592c318 (patch) | |
tree | 3888722c1c2591c00971a1e3468a9235aac30905 /net/irda | |
parent | b9f1f48ce20a1b923429c216669d03b5a900a8cf (diff) |
net/irda: add missing error path release_sock call
commit 896ee0eee6261e30c3623be931c3f621428947df upstream.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/irda')
-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 cc616974a447..8ad05f88b453 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -2584,8 +2584,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; |