tests: qmp-cmd-test: fix memory leak
commit15c51f724ec61ab6a6910c41113d6d07164b6ca4
authorLi Qiang <liq3ea@163.com>
Wed, 15 Jul 2020 15:41:17 +0000 (15 08:41 -0700)
committerThomas Huth <thuth@redhat.com>
Fri, 17 Jul 2020 08:44:23 +0000 (17 10:44 +0200)
tree906b1ff20f5fb209737ec43f2cbd843a5abd51a3
parent82e258db15dc563e1d015c19b3af2d585695a7b1
tests: qmp-cmd-test: fix memory leak

Properly free each test response to avoid memory leak and separate
qtest_qmp() calls with spare lines, in a consistent manner.

Fixes: 5b88849e7b9("tests/qmp-cmd-test: Add qmp/object-add-failure-modes")
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20200715154117.15456-1-liq3ea@163.com>
Fixes: 9fc719b869 ("tests/qmp-cmd-test: Add qmp/object-add-duplicate-id")
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/qmp-cmd-test.c