0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 08:54:02 +01:00

Fix use after free.

This commit is contained in:
Jilles Tjoelker 2014-02-23 23:46:57 +01:00
parent 12edf3e3d2
commit b84e58f905
2 changed files with 2 additions and 2 deletions

View file

@ -267,8 +267,8 @@ void unref_blacklist(struct Blacklist *blptr)
{ {
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, blptr->filters.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, blptr->filters.head)
{ {
rb_free(ptr);
rb_dlinkDelete(ptr, &blptr->filters); rb_dlinkDelete(ptr, &blptr->filters);
rb_free(ptr);
} }
rb_dlinkFindDestroy(blptr, &blacklist_list); rb_dlinkFindDestroy(blptr, &blacklist_list);

View file

@ -1946,8 +1946,8 @@ cleanup_bl:
{ {
RB_DLINK_FOREACH_SAFE(ptr, nptr, yy_blacklist_filters.head) RB_DLINK_FOREACH_SAFE(ptr, nptr, yy_blacklist_filters.head)
{ {
rb_free(ptr);
rb_dlinkDelete(ptr, &yy_blacklist_filters); rb_dlinkDelete(ptr, &yy_blacklist_filters);
rb_free(ptr);
} }
} }
else else