Merge pull request #919 from ailin-nemui/uafs

Use-after-frees

(cherry picked from commit afb3daaf65)
This commit is contained in:
ailin-nemui 2018-09-04 09:35:47 +02:00
commit 33dcf7a337
5 changed files with 10 additions and 6 deletions

View file

@ -57,8 +57,9 @@ void dcc_unregister_type(const char *type)
pos = gslist_find_string(dcc_types, type);
if (pos != NULL) {
g_free(pos->data);
dcc_types = g_slist_remove(dcc_types, pos->data);
void *tmp = pos->data;
dcc_types = g_slist_remove(dcc_types, pos->data);
g_free(tmp);
}
}