Sun, 10 Nov 2019 16:29:55 +0100
fix heap-use-after-free in prefs removal
| libpurple/prefs.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/prefs.c Wed Dec 18 22:41:28 2019 +0100 +++ b/libpurple/prefs.c Sun Nov 10 16:29:55 2019 +0100 @@ -789,12 +789,15 @@ } child = pref->first_child; + pref->first_child = NULL; while (child) { struct purple_pref *next; if (child->first_child) { next = child->first_child; + child->first_child = NULL; } else if (child->sibling) { next = child->sibling; + child->sibling = NULL; free_pref(child); } else { if (child->parent != pref) {