Author: post
Date: 2011-01-29 14:42:53 +0100 (Sat, 29 Jan 2011)
New Revision: 3805
Modified:
trunk/librawstudio/rs-profile-factory.c
Log:
Don't leak directory handles while opening profiles.
Modified: trunk/librawstudio/rs-profile-factory.c
===================================================================
--- trunk/librawstudio/rs-profile-factory.c 2011-01-21 23:34:13 UTC (rev
3804)
+++ trunk/librawstudio/rs-profile-factory.c 2011-01-29 13:42:53 UTC (rev
3805)
@@ -95,7 +95,10 @@
gchar *filename;
GDir *dir = g_dir_open(path, 0, NULL);
- while((dir != NULL) && (basename = g_dir_read_name(dir)))
+ if (NULL == dir )
+ return;
+
+ while((basename = g_dir_read_name(dir)))
{
if (basename[0] == '.')
continue;
@@ -117,10 +120,9 @@
))
add_icc_profile(factory, filename);
}
-
g_free(filename);
}
-
+ g_dir_close(dir);
}
RSProfileFactory *
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit