forked from github/server
correctly release messages created in test_merge_split
This commit is contained in:
parent
203b058166
commit
5018bbb0c0
|
@ -41,11 +41,14 @@ static void test_merge_split(CuTest *tc) {
|
|||
message_list *mlist = 0, *append = 0;
|
||||
struct mlist **split; // TODO: why is this a double asterisk?
|
||||
message_type *mtype = mt_new("custom", NULL);
|
||||
message *msg;
|
||||
|
||||
test_cleanup();
|
||||
mt_register(mtype);
|
||||
add_message(&mlist, msg_message(mtype->name, ""));
|
||||
add_message(&append, msg_message(mtype->name, ""));
|
||||
add_message(&mlist, msg = 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, &mlist->begin->next, mlist->end);
|
||||
|
|
Loading…
Reference in New Issue