summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-01-06 22:11:48 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-01-06 22:12:27 +0000
commitc89cbed9096dca9b44778be07380d50f939db4a2 (patch)
treec4eae89f697a4f12d077bc6953ca94f8324d1f0b /bus
parent1650d77bf186bee05f204f40f7e4d7d1c032fad9 (diff)
downloaddbus-c89cbed9096dca9b44778be07380d50f939db4a2.tar.gz
selinux: avoid leaking on systems where va_start allocates memory
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087
Diffstat (limited to 'bus')
-rw-r--r--bus/selinux.c4
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);
}