Don't leak fd while enumerating directories
authorDavid Zeuthen <davidz@redhat.com>
Sat, 13 Aug 2011 15:59:02 +0000 (11:59 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Sat, 13 Aug 2011 15:59:02 +0000 (11:59 -0400)
Signed-off-by: David Zeuthen <davidz@redhat.com>
src/udisksdaemonutil.c

index d685325..69b35cc 100644 (file)
@@ -279,6 +279,8 @@ udisks_daemon_util_resolve_links (const gchar *path,
   g_ptr_array_add (p, NULL);
 
  out:
+  if (dir != NULL)
+    g_dir_close (dir);
   g_free (s);
 
   return (gchar **) g_ptr_array_free (p, FALSE);