mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02: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:
committed by
Philip Withnall
parent
9f070db4c5
commit
9d4d5dfca8
@@ -3071,11 +3071,6 @@ link_handlers_to_unregistered_apps (void)
|
|||||||
(handler->executable_folded == NULL))
|
(handler->executable_folded == NULL))
|
||||||
continue;
|
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);
|
g_hash_table_iter_init (&app_iter, apps_by_id);
|
||||||
|
|
||||||
while (g_hash_table_iter_next (&app_iter,
|
while (g_hash_table_iter_next (&app_iter,
|
||||||
@@ -3096,6 +3091,11 @@ link_handlers_to_unregistered_apps (void)
|
|||||||
if (handler->app != NULL)
|
if (handler->app != NULL)
|
||||||
continue;
|
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);
|
g_hash_table_iter_init (&app_iter, apps_by_exe);
|
||||||
|
|
||||||
while ((hndexe_fc_basename != NULL) &&
|
while ((hndexe_fc_basename != NULL) &&
|
||||||
|
Reference in New Issue
Block a user