Merge pull request #919 from ailin-nemui/uafs

Use-after-frees
This commit is contained in:
ailin-nemui 2018-09-04 09:35:47 +02:00 committed by GitHub
commit afb3daaf65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
}
}