Use-after-frees

Hi folks!

I tried clang-static-analyzer on irssi 1.1.1, it seems like it
finds some things. Here's a diff, but there might be more that you would
want to check, or choose to work differently.

(in special-vars.c, ret is commands->data sometime)

I hope it's not too much trouble if reported as a confidential bug.
Thanks.
This commit is contained in:
coypu@sdf.org 2018-08-11 22:28:14 +00:00 committed by ailin-nemui
commit 610ab2dafa
5 changed files with 8 additions and 5 deletions

View file

@ -57,8 +57,8 @@ 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);
g_free(pos->data);
}
}