diff mbox

[RFC,09/10] tests: fix memleak in error path test for input visitor

Message ID 1383611860-9053-10-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Nov. 5, 2013, 12:37 a.m. UTC
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Cc: qemu-stable@nongnu.org
---
 tests/test-qmp-input-visitor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Eric Blake Nov. 5, 2013, 1:20 p.m. UTC | #1
On 11/04/2013 05:37 PM, Wenchao Xia wrote:
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> Cc: qemu-stable@nongnu.org
> ---
>  tests/test-qmp-input-visitor.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

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

You should repost your mem-leak patches for qemu-stable as an
independent thread marked "for-1.7", without RFC, to ensure that they
are applied in a timely manner without waiting for the rest of this series.

> 
> diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
> index 0beb8fb..1e1c6fa 100644
> --- a/tests/test-qmp-input-visitor.c
> +++ b/tests/test-qmp-input-visitor.c
> @@ -604,6 +604,7 @@ static void test_visitor_in_errors(TestInputVisitorData *data,
>      g_assert(error_is_set(&errp));
>      g_assert(p->string == NULL);
>  
> +    error_free(errp);
>      g_free(p->string);
>      g_free(p);
>  }
>
Wayne Xia Nov. 6, 2013, 2:18 a.m. UTC | #2
于 2013/11/5 21:20, Eric Blake 写道:
> On 11/04/2013 05:37 PM, Wenchao Xia wrote:
>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>> Cc: qemu-stable@nongnu.org
>> ---
>>   tests/test-qmp-input-visitor.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> You should repost your mem-leak patches for qemu-stable as an
> independent thread marked "for-1.7", without RFC, to ensure that they
> are applied in a timely manner without waiting for the rest of this series.
>

   OK, will resend.

>>
>> diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
>> index 0beb8fb..1e1c6fa 100644
>> --- a/tests/test-qmp-input-visitor.c
>> +++ b/tests/test-qmp-input-visitor.c
>> @@ -604,6 +604,7 @@ static void test_visitor_in_errors(TestInputVisitorData *data,
>>       g_assert(error_is_set(&errp));
>>       g_assert(p->string == NULL);
>>
>> +    error_free(errp);
>>       g_free(p->string);
>>       g_free(p);
>>   }
>>
>
diff mbox

Patch

diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
index 0beb8fb..1e1c6fa 100644
--- a/tests/test-qmp-input-visitor.c
+++ b/tests/test-qmp-input-visitor.c
@@ -604,6 +604,7 @@  static void test_visitor_in_errors(TestInputVisitorData *data,
     g_assert(error_is_set(&errp));
     g_assert(p->string == NULL);
 
+    error_free(errp);
     g_free(p->string);
     g_free(p);
 }