[Issue #78] Fixed assert message being freed too early, leading to some dangling pointers to invalid memory

Cherry-pick of commit 8197bef66c.
This commit is contained in:
Snaipe 2015-10-02 00:58:38 +02:00
parent 3148348c37
commit 6f9d29a602

View file

@ -183,6 +183,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;