On Fri, Mar 30, 2018 at 12:59:09 +0200, Peter Krempa wrote: > Make sure that the 'a' and 'A' modifiers for virJSONValueObjectAddVArgs > behave correctly. > > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> > --- If you apply this patch without the fix first you get the following error in valgrind: $ ./run valgrind tests/virjsontest ==164888== Memcheck, a memory error detector ==164888== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==164888== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==164888== Command: /home/pipo/libvirt/tests/.libs/virjsontest ==164888== TEST: virjsontest ........................................ 40 .==164888== Invalid free() / delete / delete[] / realloc() ==164888== at 0x4C2E1AB: free (vg_replace_malloc.c:530) ==164888== by 0x4EBD808: virFree (viralloc.c:582) ==164888== by 0x4EF6ACE: virJSONValueFree (virjson.c:382) ==164888== by 0x4EF6AAC: virJSONValueFree (virjson.c:362) ==164888== by 0x4EF88A1: virJSONValueObjectCreateVArgs (virjson.c:329) ==164888== by 0x4EF894B: virJSONValueObjectCreate (virjson.c:344) ==164888== by 0x10BDFB: testJSONObjectFormatSteal (virjsontest.c:446) ==164888== by 0x10D74E: virTestRun (testutils.c:180) ==164888== by 0x10B929: mymain (virjsontest.c:636) ==164888== by 0x10E92F: virTestMain (testutils.c:1119) ==164888== by 0x10CE58: main (virjsontest.c:656) ==164888== Address 0x1ffefffa70 is on thread 1's stack ==164888== in frame #6, created by testJSONObjectFormatSteal (virjsontest.c:434) ==164888== !.......... 52 FAIL
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list