mirror of https://gitee.com/openkylin/libvirt.git
virschematest: Initialize @data
==8630== Invalid read of size 8 ==8630== at 0x4EA4F0F: virFree (viralloc.c:582) ==8630== by 0x4F398F0: virXMLValidatorFree (virxml.c:1257) ==8630== by 0x40305C: mymain (virschematest.c:191) ==8630== by 0x405159: virTestMain (testutils.c:982) ==8630== by 0x403553: main (virschematest.c:215) ==8630== Address 0xcd72243 is 131 bytes inside a block of size 177 free'd ==8630== at 0x4C2B1F0: free (vg_replace_malloc.c:473) ==8630== by 0x4EA4F19: virFree (viralloc.c:582) ==8630== by 0x4ED0973: virFindFileInPath (virfile.c:1646) ==8630== by 0x405149: virTestMain (testutils.c:980) ==8630== by 0x403553: main (virschematest.c:215) Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c4b92f1a8a
commit
f87cc927f7
|
@ -173,6 +173,8 @@ mymain(void)
|
|||
int ret = 0;
|
||||
struct testSchemaFileData data;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
#define DO_TEST(sch, ...) \
|
||||
do { \
|
||||
data.schema = sch; \
|
||||
|
|
Loading…
Reference in New Issue