projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dd72f5
)
audit: always follow va_copy() with va_end()
author
Jesper Juhl
<
[email protected]
>
Sun, 8 Jan 2012 21:44:29 +0000
(22:44 +0100)
committer
Linus Torvalds
<
[email protected]
>
Sun, 8 Jan 2012 22:15:21 +0000
(14:15 -0800)
A call to va_copy() should always be followed by a call to va_end() in
the same function. In kernel/autit.c::audit_log_vformat() this is not
always done. This patch makes sure va_end() is always called.
Signed-off-by: Jesper Juhl <
[email protected]
>
Cc: Al Viro <
[email protected]
>
Cc: Eric Paris <
[email protected]
>
Cc: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/audit.c
patch
|
blob
|
history
diff --git
a/kernel/audit.c
b/kernel/audit.c
index 09fae2677a45e11ab650b91b1dee7877a2ee8957..2c1d6ab7106ee9921bc8456d0e9b5e11637a11f3 100644
(file)
--- a/
kernel/audit.c
+++ b/
kernel/audit.c
@@
-1260,12
+1260,13
@@
static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
avail = audit_expand(ab,
max_t(unsigned, AUDIT_BUFSIZ, 1+len-avail));
if (!avail)
- goto out;
+ goto out
_va_end
;
len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args2);
}
- va_end(args2);
if (len > 0)
skb_put(skb, len);
+out_va_end:
+ va_end(args2);
out:
return;
}