mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
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
This commit is contained in:
parent
5f424088f5
commit
9dd6c60fbf
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user