If not initialized and the virAsprintf to jsonreply or fulllablel fails,
then the call to qemuMonitorTestFree will take stack data.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
tests/qemumonitorjsontest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 0574f8c..993a373 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -753,7 +753,7 @@ qemuMonitorJSONTestAttachOneChardev(virDomainXMLOptionPtr xmlopt,
bool fail)
{
- struct qemuMonitorJSONTestAttachChardevData data;
+ struct qemuMonitorJSONTestAttachChardevData data = {0};
char *jsonreply = NULL;
char *fulllabel = NULL;
int ret = -1;
--
2.7.4