diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-03-07 17:42:25 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-03-07 17:44:23 -0500 |
commit | 9dd6c60fbfc742eb08a5b5b27986395ed439fbc1 (patch) | |
tree | 1ce023741965358cc3b5b9c5e8a9c1296411ef9e /gio/giomodule.c | |
parent | 5f424088f5bdf041d5653f5f2aa310150155f58c (diff) | |
download | glib-9dd6c60fbfc742eb08a5b5b27986395ed439fbc1.tar.gz glib-9dd6c60fbfc742eb08a5b5b27986395ed439fbc1.tar.bz2 glib-9dd6c60fbfc742eb08a5b5b27986395ed439fbc1.zip |
Plug a memleak in g_io_modules_scan_all_in_directory
...and at the same time, fix a malloc<>g_free mismatch.
Patch by Caolan McNamara, bug 611897
Diffstat (limited to 'gio/giomodule.c')
-rw-r--r-- | gio/giomodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/giomodule.c b/gio/giomodule.c index 236ee2f44..b0a960b37 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c @@ -321,14 +321,14 @@ g_io_modules_scan_all_in_directory (const char *dirname) continue; /* Invalid line, ignore */ *colon = 0; /* terminate filename */ - file = strdup (line); + file = g_strdup (line); colon++; /* after colon */ while (g_ascii_isspace (*colon)) colon++; extension_points = g_strsplit (colon, ",", -1); - g_hash_table_insert (cache, g_strdup (file), extension_points); + g_hash_table_insert (cache, file, extension_points); } g_strfreev (lines); } |