From 741d1e6aadd4942c7174ced9fd550bb0e3c2434c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 28 Mar 2011 17:24:53 +0100 Subject: [PATCH 15/25] marshal_collection_ptrarray: abandon broken containers, simplify exit path --- dbus/dbus-gvalue.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c index 6493bc5..13038a2 100644 --- a/dbus/dbus-gvalue.c +++ b/dbus/dbus-gvalue.c @@ -1925,13 +1925,13 @@ marshal_collection_ptrarray (DBusMessageIter *iter, collection_marshal_iterator, &data); - if (!dbus_message_iter_close_container (iter, &subiter)) - goto oom; - - return !data.err; - oom: - g_error ("out of memory"); - return FALSE; + if (data.err) + { + dbus_message_iter_abandon_container (iter, &subiter); + return FALSE; + } + + return dbus_message_iter_close_container (iter, &subiter); } -- 1.7.4.1