forked from github/server
memory leak: free message_list objects
This commit is contained in:
parent
333c27403f
commit
457465b4a2
2 changed files with 3 additions and 0 deletions
|
@ -152,6 +152,7 @@ static void test_give_men_in_ocean(CuTest * tc) {
|
||||||
msg = disband_men(1, env.src, NULL);
|
msg = disband_men(1, env.src, NULL);
|
||||||
CuAssertStrEquals(tc, "give_person_ocean", (const char *)msg->parameters[0].v);
|
CuAssertStrEquals(tc, "give_person_ocean", (const char *)msg->parameters[0].v);
|
||||||
CuAssertIntEquals(tc, 0, env.src->number);
|
CuAssertIntEquals(tc, 0, env.src->number);
|
||||||
|
msg_release(msg);
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,8 @@ static void test_merge_split(CuTest *tc) {
|
||||||
CuAssertPtrEquals(tc, append->begin, mlist->begin->next);
|
CuAssertPtrEquals(tc, append->begin, mlist->begin->next);
|
||||||
split_messages(mlist, split);
|
split_messages(mlist, split);
|
||||||
CuAssertPtrEquals(tc, 0, mlist->begin->next);
|
CuAssertPtrEquals(tc, 0, mlist->begin->next);
|
||||||
|
free_messagelist(mlist);
|
||||||
|
free_messagelist(append);
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue