From: Ralf Habacker Date: Mon, 20 Apr 2015 20:14:06 +0000 (+0200) Subject: test_remove_directory: Fix 'variable iter going out of scope leaks the storage it... X-Git-Tag: dbus-1.9.16~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53fbfe0c706e020ed52bee0795fbb5436920317d;p=thirdparty%2Fdbus.git test_remove_directory: Fix 'variable iter going out of scope leaks the storage it points to' (CID 54729) Reported by Coverity: CID 54729: Resource leak (RESOURCE_LEAK) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 Reviewed-by: Simon McVittie --- diff --git a/bus/activation.c b/bus/activation.c index fb25d68e6..390b8362c 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -2397,6 +2397,7 @@ test_remove_directory (DBusString *dir) if (!test_remove_service_file (dir, _dbus_string_get_const_data (&filename))) { ret_val = FALSE; + _dbus_directory_close (iter); goto out; } }