Fixed assert message being freed too early, leading to some dangling pointers to invalid memory

This commit is contained in:
Snaipe 2015-10-02 00:58:38 +02:00
parent 2d7c35b4f0
commit 8197bef66c

View file

@ -184,6 +184,7 @@ static void push_assert(s_glob_stats *stats,
s_assert_stats *dup = smalloc(sizeof (s_assert_stats));
memcpy(dup, data, sizeof (s_assert_stats));
dup->message = strdup(data->message);
dup->next = test->asserts;
test->asserts = dup;