[gnc-module.c] free a GList* properly

g_list_free (current) was a NOP because current became NULL after the
preceding GList traversal.
This commit is contained in:
Christopher Lam 2021-08-24 22:31:37 +08:00
parent 383276579e
commit 9ddb9e8215

View File

@ -257,11 +257,7 @@ gnc_module_system_refresh(void)
}
/* free the search dir strings */
for (current = search_dirs; current; current = current->next)
{
g_free(current->data);
}
g_list_free(current);
g_list_free_full (search_dirs, g_free);
}