test_remove_directory: Fix 'variable iter going out of scope leaks the storage it...
authorRalf Habacker <ralf.habacker@freenet.de>
Mon, 20 Apr 2015 20:14:06 +0000 (22:14 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Fri, 1 May 2015 21:05:09 +0000 (23:05 +0200)
Reported by Coverity: CID 54729: Resource leak (RESOURCE_LEAK)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/activation.c

index fb25d68..390b836 100644 (file)
@@ -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;
         }
     }