From 4157b6a19159f3a10fba4efba532d7c4b4f044ca Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 4 Jul 2017 13:31:38 +0100 Subject: [PATCH] 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 (cherry picked from commit 6b7bdb105b120b3db312de93af94af1bb6a2a474) --- dbus/dbus-message.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index e0d9c8b..0df6667 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -1935,6 +1935,7 @@ dbus_message_append_args_valist (DBusMessage *message, _dbus_warn ("arrays of %s can't be appended with %s for now\n", _dbus_type_to_string (element_type), _DBUS_FUNCTION_NAME); + dbus_message_iter_abandon_container (&iter, &array); goto failed; } -- 2.7.4