]>
Commit | Line | Data |
---|---|---|
8e43aecd PS |
1 | after call of g_slist_remove() the `pos` points to released area, |
2 | so dereferencing pos->data isn't acceptable. | |
3 | ||
4 | --- irssi-0.8.10/src/irc/dcc/dcc.c.orig 2005-10-19 04:13:31.000000000 +0200 | |
5 | +++ irssi-0.8.10/src/irc/dcc/dcc.c 2006-05-02 22:33:11.000000000 +0200 | |
6 | @@ -55,11 +55,13 @@ | |
7 | void dcc_unregister_type(const char *type) | |
8 | { | |
9 | GSList *pos; | |
10 | + gpointer data; | |
11 | ||
12 | pos = gslist_find_string(dcc_types, type); | |
13 | if (pos != NULL) { | |
14 | - dcc_types = g_slist_remove(dcc_types, pos->data); | |
15 | - g_free(pos->data); | |
16 | + data = pos->data; | |
17 | + dcc_types = g_slist_remove(dcc_types, data); | |
18 | + g_free(data); | |
19 | } | |
20 | } | |
21 |