[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] Fix some memory leaks in test-visitor-serial
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] Fix some memory leaks in test-visitor-serialization |
Date: |
Thu, 28 Mar 2013 14:32:49 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Mar 28, 2013 at 07:22:12AM -0400, Stefan Berger wrote:
> This patch fixes some of the memory leaks in
> test-visitor-serialization but not all of them.
>
> Signed-off-by: Stefan Berger <address@hidden>
>
> ---
> v1->v2: call qobject_decref(obj) earlier
>
> ---
> tests/test-visitor-serialization.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> Index: qemu-git.pt/tests/test-visitor-serialization.c
> ===================================================================
> --- qemu-git.pt.orig/tests/test-visitor-serialization.c
> +++ qemu-git.pt/tests/test-visitor-serialization.c
> @@ -258,6 +258,7 @@ static void test_primitives(gconstpointe
> g_assert(pt_copy != NULL);
> if (pt->type == PTYPE_STRING) {
> g_assert_cmpstr(pt->value.string, ==, pt_copy->value.string);
> + g_free((char *)pt_copy->value.string);
> } else if (pt->type == PTYPE_NUMBER) {
> /* we serialize with %f for our reference visitors, so
> rather than fuzzy
> * floating math to test "equality", just compare the
> formatted values
The patch is line-wrapped. Please fix your mail client configuration,
git-am(1) refuses to apply automatically.
Thanks,
Stefan