Skip to content

Commit

Permalink
[patch 1/1] audit_send_reply(): fix error-path memory leak
Browse files Browse the repository at this point in the history
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=10663

Reporter: Daniel Marjamki <danielm77@spray.se>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
akpm00 authored and Al Viro committed May 17, 2008
1 parent 6ee6504 commit fcaf1eb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,16 +572,17 @@ void audit_send_reply(int pid, int seq, int type, int done, int multi,

skb = audit_make_reply(pid, seq, type, done, multi, payload, size);
if (!skb)
return;
goto out;

reply->pid = pid;
reply->skb = skb;

tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply");
if (IS_ERR(tsk)) {
kfree(reply);
kfree_skb(skb);
}
if (!IS_ERR(tsk))
return;
kfree_skb(skb);
out:
kfree(reply);
}

/*
Expand Down

0 comments on commit fcaf1eb

Please sign in to comment.