Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 896ee0ee authored by Kees Cook's avatar Kees Cook Committed by David S. Miller
Browse files

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: default avatarKees Cook <keescook@chromium.org>
Reported-by: default avatarBrad Spengler <spender@grsecurity.net>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa90b077
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;