Skip to content
Snippets Groups Projects
Commit d95ecb40 authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy
Browse files

swim: fix a 'use after free' in SWIM tests

It is a miracle, but somehow it worked until I changed a couple
of places. Here objects stored in an rlist are freed, but not
deleted from the list. The list is reused after that.
parent 675a4c21
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,7 @@ swim_test_packet_new(const char *data, int size, const struct sockaddr_in *src,
static inline void
swim_test_packet_delete(struct swim_test_packet *p)
{
rlist_del_entry(p, in_queue);
free(p);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment