]> www.infradead.org Git - users/dwmw2/linux.git/commit
audit: fix a net reference leak in audit_send_reply()
authorPaul Moore <paul@paul-moore.com>
Mon, 20 Apr 2020 14:09:29 +0000 (10:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:32:30 +0000 (09:32 +0200)
commit3b6768b51e00f7eb70ff42f49f008011135129f1
treea421a0afff57b4c07672550239f727db3598fcdd
parent32cc2f974a302cf3fc915f1fc22e4ba3d97fea5c
audit: fix a net reference leak in audit_send_reply()

[ Upstream commit a48b284b403a4a073d8beb72d2bb33e54df67fb6 ]

If audit_send_reply() fails when trying to create a new thread to
send the reply it also fails to cleanup properly, leaking a reference
to a net structure.  This patch fixes the error path and makes a
handful of other cleanups that came up while fixing the code.

Reported-by: teroincn@gmail.com
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/audit.c