From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULCwv-0006XJ-O9 for qemu-devel@nongnu.org; Thu, 28 Mar 2013 09:33:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULCwp-0002Xz-Ui for qemu-devel@nongnu.org; Thu, 28 Mar 2013 09:33:01 -0400 Date: Thu, 28 Mar 2013 14:32:49 +0100 From: Stefan Hajnoczi Message-ID: <20130328133249.GF22865@stefanha-thinkpad.redhat.com> References: <515427E4.70402@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <515427E4.70402@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v2] Fix some memory leaks in test-visitor-serialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: qemu-trivial@nongnu.org, Michael Roth , qemu-devel 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 > > --- > 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