mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
GWin32AppInfo: fix a potential memory leak
Make sure that hndexe_fc_basename is only allocated before it is actually used.
This commit is contained in:
parent
9f070db4c5
commit
9d4d5dfca8
@ -3071,11 +3071,6 @@ link_handlers_to_unregistered_apps (void)
|
||||
(handler->executable_folded == NULL))
|
||||
continue;
|
||||
|
||||
hndexe_fc_basename = g_utf8_casefold (handler->executable_basename, -1);
|
||||
|
||||
if (hndexe_fc_basename == NULL)
|
||||
continue;
|
||||
|
||||
g_hash_table_iter_init (&app_iter, apps_by_id);
|
||||
|
||||
while (g_hash_table_iter_next (&app_iter,
|
||||
@ -3096,6 +3091,11 @@ link_handlers_to_unregistered_apps (void)
|
||||
if (handler->app != NULL)
|
||||
continue;
|
||||
|
||||
hndexe_fc_basename = g_utf8_casefold (handler->executable_basename, -1);
|
||||
|
||||
if (hndexe_fc_basename == NULL)
|
||||
continue;
|
||||
|
||||
g_hash_table_iter_init (&app_iter, apps_by_exe);
|
||||
|
||||
while ((hndexe_fc_basename != NULL) &&
|
||||
|
Loading…
Reference in New Issue
Block a user