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 <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Ralf Habacker 2015-04-20 22:14:06 +02:00
parent e48dd5b3ca
commit 53fbfe0c70

View 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;
}
}