From: Simon McVittie Date: Tue, 6 Jan 2015 22:11:48 +0000 (+0000) Subject: selinux: avoid leaking on systems where va_start allocates memory X-Git-Tag: dbus-1.9.8~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c89cbed9096dca9b44778be07380d50f939db4a2;p=thirdparty%2Fdbus.git selinux: avoid leaking on systems where va_start allocates memory Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087 --- diff --git a/bus/selinux.c b/bus/selinux.c index 99994ca9c..2b8e5db27 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); }