]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
selinux: avoid leaking on systems where va_start allocates memory
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 6 Jan 2015 22:11:48 +0000 (22:11 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 6 Jan 2015 22:12:27 +0000 (22:12 +0000)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087

bus/selinux.c

index 99994ca9cf4ffceeacaa3b2e8b8f87e3892a7f20..2b8e5db27bc94878c761df42dce0696155128fbb 100644 (file)
@@ -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);
 }