提交 42478dac 编写于 作者: M Marc-André Lureau 提交者: Markus Armbruster

tests: fix crumple/recursive leak

Spotted by ASAN:

=================================================================
==27907==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4120 byte(s) in 1 object(s) allocated from:
    #0 0x7f913458ce50 in calloc (/lib64/libasan.so.5+0xeee50)
    #1 0x7f9133fd641d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5241d)
    #2 0x5561c6643c95 in qdict_crumple_test_recursive /home/elmarco/src/qq/tests/check-block-qdict.c:438
    #3 0x7f9133ff7c49  (/lib64/libglib-2.0.so.0+0x73c49)
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180809114417.28718-2-marcandre.lureau@redhat.com>
[Screwed up in commit 2860b2b2]
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
上级 b736e25a
......@@ -491,6 +491,7 @@ static void qdict_crumple_test_recursive(void)
empty_list_0 = qobject_to(QDict, qlist_pop(empty_list));
g_assert(empty_list_0);
g_assert_cmpint(qdict_size(empty_list_0), ==, 0);
qobject_unref(empty_list_0);
qobject_unref(src);
qobject_unref(dst);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册