diff mbox series

qmp-test: fix response leak

Message ID 20180326172041.21009-1-marcandre.lureau@redhat.com
State New
Headers show
Series qmp-test: fix response leak | expand

Commit Message

Marc-André Lureau March 26, 2018, 5:20 p.m. UTC
Apparently introduced in commit a4f90923b520f1dc0a768634877eb412e5052c26.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/qmp-test.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Blake March 26, 2018, 6:33 p.m. UTC | #1
On 03/26/2018 12:20 PM, Marc-André Lureau wrote:
> Apparently introduced in commit a4f90923b520f1dc0a768634877eb412e5052c26.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   tests/qmp-test.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

I'll queue this through my qapi tree, unless applying Peter's for-2.12 
patches fixes it differently.

> 
> diff --git a/tests/qmp-test.c b/tests/qmp-test.c
> index 558e83540c..8de99a4727 100644
> --- a/tests/qmp-test.c
> +++ b/tests/qmp-test.c
> @@ -90,6 +90,7 @@ static void test_qmp_protocol(void)
>       test_version(qdict_get(q, "version"));
>       capabilities = qdict_get_qlist(q, "capabilities");
>       g_assert(capabilities && qlist_empty(capabilities));
> +    QDECREF(resp);
>   
>       /* Test valid command before handshake */
>       resp = qtest_qmp(qts, "{ 'execute': 'query-version' }");
>
Eric Blake March 26, 2018, 9:57 p.m. UTC | #2
On 03/26/2018 01:33 PM, Eric Blake wrote:
> On 03/26/2018 12:20 PM, Marc-André Lureau wrote:
>> Apparently introduced in commit a4f90923b520f1dc0a768634877eb412e5052c26.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>   tests/qmp-test.c | 1 +
>>   1 file changed, 1 insertion(+)
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
> I'll queue this through my qapi tree, unless applying Peter's for-2.12 
> patches fixes it differently.

Okay, it's needed, and I'm queuing it.
diff mbox series

Patch

diff --git a/tests/qmp-test.c b/tests/qmp-test.c
index 558e83540c..8de99a4727 100644
--- a/tests/qmp-test.c
+++ b/tests/qmp-test.c
@@ -90,6 +90,7 @@  static void test_qmp_protocol(void)
     test_version(qdict_get(q, "version"));
     capabilities = qdict_get_qlist(q, "capabilities");
     g_assert(capabilities && qlist_empty(capabilities));
+    QDECREF(resp);
 
     /* Test valid command before handshake */
     resp = qtest_qmp(qts, "{ 'execute': 'query-version' }");