Chen Qun
7aed584ca6
tests/qtest: fix memleak in npcm7xx_watchdog_timer-test
Properly free resp for get_watchdog_action() to avoid memory leak.
ASAN shows memory leak stack:
Indirect leak of 12360 byte(s) in 3 object(s) allocated from:
#0 0x7f41ab6cbd4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e)
#1 0x7f41ab4eaa50 in g_malloc0 (/lib64/libglib-2.0.so.0+0x55a50)
#2 0x556487d5374b in qdict_new ../qobject/qdict.c:29
#3 0x556487d65e1a in parse_object ../qobject/json-parser.c:318
#4 0x556487d65cb6 in parse_pair ../qobject/json-parser.c:287
#5 0x556487d65ebd in parse_object ../qobject/json-parser.c:343
#6 0x556487d661d5 in json_parser_parse ../qobject/json-parser.c:580
#7 0x556487d513df in json_message_process_token ../qobject/json-streamer.c:92
#8 0x556487d63919 in json_lexer_feed_char ../qobject/json-lexer.c:313
#9 0x556487d63d75 in json_lexer_feed ../qobject/json-lexer.c:350
#10 0x556487d28b2a in qmp_fd_receive ../tests/qtest/libqtest.c:613
#11 0x556487d2a16f in qtest_qmp_eventwait_ref ../tests/qtest/libqtest.c:827
#12 0x556487d248e2 in get_watchdog_action ../tests/qtest/npcm7xx_watchdog_timer-test.c:94
#13 0x556487d25765 in test_enabling_flags ../tests/qtest/npcm7xx_watchdog_timer-test.c:243
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Message-Id: <20201118115646.2461726-3-kuhn.chenqun@huawei.com>
Reviewed-by: Havard Skinnemoen <hskinnemoen@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-11-20 13:35:33 +01:00
..
2020-11-16 17:00:36 +00:00
2020-10-21 11:36:19 +02:00
2020-09-14 14:23:19 +01:00
2020-10-27 09:53:47 +00:00
2020-10-22 11:53:53 -04:00
2020-10-17 10:45:50 -04:00
2020-11-17 09:45:24 +01:00
2020-11-15 17:04:40 +01:00
2020-10-13 12:48:17 +02:00
2020-10-09 17:27:55 +01:00
2020-10-17 10:45:52 -04:00
2020-11-17 12:38:32 +01:00
2020-11-20 13:35:33 +01:00
2020-10-27 10:44:03 +00:00
2020-10-13 12:48:17 +02:00
2020-11-17 09:45:24 +01:00
2020-09-23 16:07:44 +01:00
2020-09-23 16:07:44 +01:00
2020-09-10 11:02:17 +01:00
2020-09-10 11:02:17 +01:00
2020-09-10 11:02:17 +01:00
2020-10-02 15:46:40 +02:00
2020-11-17 15:39:53 +01:00
2020-09-09 09:27:09 -04:00
2020-09-18 13:49:48 -04:00
2020-11-15 17:04:40 +01:00
2020-11-15 17:04:40 +01:00
2020-09-23 16:07:44 +01:00
2020-10-17 10:45:51 -04:00
2020-10-17 10:45:50 -04:00
2020-10-22 11:53:54 -04:00
2020-09-23 16:07:44 +01:00
2020-09-23 16:07:44 +01:00
2020-10-13 08:08:55 +02:00
2020-09-16 08:41:06 +02:00
2020-09-23 16:07:44 +01:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-11-15 17:04:40 +01:00
2020-10-27 15:26:20 +01:00
2020-10-13 13:33:46 +02:00
2020-11-15 17:04:40 +01:00
2020-10-13 13:33:45 +02:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-11-15 17:04:40 +01:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-09-23 13:45:52 +01:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-10-29 09:57:37 +00:00
2020-09-23 13:41:58 +01:00
2020-10-15 16:06:27 +02:00
2020-09-23 16:07:44 +01:00
2020-09-16 12:15:07 +02:00
2020-09-08 11:43:16 +02:00
2020-11-15 17:04:40 +01:00
2020-10-09 07:08:19 +02:00
2020-09-03 09:38:36 +02:00
2020-09-23 16:07:44 +01:00
2020-09-16 08:41:06 +02:00
2020-09-23 16:07:44 +01:00
2020-10-05 16:41:22 +02:00
2020-09-07 12:34:17 +02:00
2020-11-03 13:17:25 +00:00
2020-11-15 17:04:40 +01:00
2020-09-16 08:41:06 +02:00
2020-09-02 07:29:26 -04:00
2020-10-23 13:42:16 +01:00