forked from github/server
correctly release messages created in test_merge_split
This commit is contained in:
parent
203b058166
commit
5018bbb0c0
1 changed files with 5 additions and 2 deletions
|
@ -41,11 +41,14 @@ static void test_merge_split(CuTest *tc) {
|
||||||
message_list *mlist = 0, *append = 0;
|
message_list *mlist = 0, *append = 0;
|
||||||
struct mlist **split; // TODO: why is this a double asterisk?
|
struct mlist **split; // TODO: why is this a double asterisk?
|
||||||
message_type *mtype = mt_new("custom", NULL);
|
message_type *mtype = mt_new("custom", NULL);
|
||||||
|
message *msg;
|
||||||
|
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
mt_register(mtype);
|
mt_register(mtype);
|
||||||
add_message(&mlist, msg_message(mtype->name, ""));
|
add_message(&mlist, msg = msg_message(mtype->name, ""));
|
||||||
add_message(&append, msg_message(mtype->name, ""));
|
msg_release(msg);
|
||||||
|
add_message(&append, msg = msg_message(mtype->name, ""));
|
||||||
|
msg_release(msg);
|
||||||
|
|
||||||
CuAssertPtrEquals(tc, 0, mlist->begin->next);
|
CuAssertPtrEquals(tc, 0, mlist->begin->next);
|
||||||
CuAssertPtrEquals(tc, &mlist->begin->next, mlist->end);
|
CuAssertPtrEquals(tc, &mlist->begin->next, mlist->end);
|
||||||
|
|
Loading…
Reference in a new issue