memory leak: free message_list objects

This commit is contained in:
Enno Rehling 2015-10-13 22:37:45 +02:00
parent 333c27403f
commit 457465b4a2
2 changed files with 3 additions and 0 deletions

View file

@ -152,6 +152,7 @@ static void test_give_men_in_ocean(CuTest * tc) {
msg = disband_men(1, env.src, NULL);
CuAssertStrEquals(tc, "give_person_ocean", (const char *)msg->parameters[0].v);
CuAssertIntEquals(tc, 0, env.src->number);
msg_release(msg);
test_cleanup();
}

View file

@ -57,6 +57,8 @@ static void test_merge_split(CuTest *tc) {
CuAssertPtrEquals(tc, append->begin, mlist->begin->next);
split_messages(mlist, split);
CuAssertPtrEquals(tc, 0, mlist->begin->next);
free_messagelist(mlist);
free_messagelist(append);
test_cleanup();
}