diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-01-06 22:11:48 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-01-06 22:12:27 +0000 |
commit | c89cbed9096dca9b44778be07380d50f939db4a2 (patch) | |
tree | c4eae89f697a4f12d077bc6953ca94f8324d1f0b | |
parent | 1650d77bf186bee05f204f40f7e4d7d1c032fad9 (diff) | |
download | dbus-c89cbed9096dca9b44778be07380d50f939db4a2.tar.gz |
selinux: avoid leaking on systems where va_start allocates memory
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087
-rw-r--r-- | bus/selinux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bus/selinux.c b/bus/selinux.c index 99994ca9..2b8e5db2 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -157,12 +157,14 @@ log_callback (const char *fmt, ...) vsnprintf(buf, sizeof(buf), fmt, ap); audit_log_user_avc_message(audit_fd, AUDIT_USER_AVC, buf, NULL, NULL, NULL, getuid()); - return; + goto out; } } #endif /* HAVE_LIBAUDIT */ vsyslog (LOG_USER | LOG_INFO, fmt, ap); + +out: va_end(ap); } |