From: Simon McVittie Date: Tue, 4 Jul 2017 12:31:38 +0000 (+0100) Subject: dbus_message_append_args_valist: Don't leak memory on inappropriate type X-Git-Tag: dbus-1.11.16~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b7bdb105b120b3db312de93af94af1bb6a2a474;p=thirdparty%2Fdbus.git dbus_message_append_args_valist: Don't leak memory on inappropriate type Found by source code inspection while trying to debug an unrelated leak. Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101568 --- diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 27b8f461e..6d9dd55f6 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -1891,6 +1891,7 @@ dbus_message_append_args_valist (DBusMessage *message, _dbus_warn ("arrays of %s can't be appended with %s for now", _dbus_type_to_string (element_type), _DBUS_FUNCTION_NAME); + dbus_message_iter_abandon_container (&iter, &array); goto failed; }