提交 7d5e79ff 编写于 作者: E Eric Blake

tests: plug memory leaks

* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Don't
allocate, since we don't use virDomainChrDefFree.
上级 c3568ec2
......@@ -86,8 +86,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
monitor_chr.type = VIR_DOMAIN_CHR_TYPE_UNIX;
monitor_chr.data.nix.path = (char *)"/tmp/test-monitor";
monitor_chr.data.nix.listen = 1;
if (!(monitor_chr.info.alias = strdup("monitor")))
goto fail;
monitor_chr.info.alias = (char *)"monitor";
flags = QEMUD_CMD_FLAG_VNC_COLON |
QEMUD_CMD_FLAG_NO_REBOOT |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册