From f87cc927f739763eaf4a926f120dba808a6d50c1 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Fri, 12 Aug 2016 12:19:44 +0200 Subject: [PATCH] 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 --- tests/virschematest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/virschematest.c b/tests/virschematest.c index 45960ba282..c9cc314c62 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -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; \ -- GitLab