mirror of https://gitee.com/openkylin/libvirt.git
tests: plug memory leaks
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Don't allocate, since we don't use virDomainChrDefFree.
This commit is contained in:
parent
c3568ec289
commit
7d5e79ffb9
tests
|
@ -86,8 +86,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||||
monitor_chr.type = VIR_DOMAIN_CHR_TYPE_UNIX;
|
monitor_chr.type = VIR_DOMAIN_CHR_TYPE_UNIX;
|
||||||
monitor_chr.data.nix.path = (char *)"/tmp/test-monitor";
|
monitor_chr.data.nix.path = (char *)"/tmp/test-monitor";
|
||||||
monitor_chr.data.nix.listen = 1;
|
monitor_chr.data.nix.listen = 1;
|
||||||
if (!(monitor_chr.info.alias = strdup("monitor")))
|
monitor_chr.info.alias = (char *)"monitor";
|
||||||
goto fail;
|
|
||||||
|
|
||||||
flags = QEMUD_CMD_FLAG_VNC_COLON |
|
flags = QEMUD_CMD_FLAG_VNC_COLON |
|
||||||
QEMUD_CMD_FLAG_NO_REBOOT |
|
QEMUD_CMD_FLAG_NO_REBOOT |
|
||||||
|
|
Loading…
Reference in New Issue