From: Eric Blake Date: Fri, 10 Dec 2010 18:08:23 +0000 (-0700) Subject: tests: plug memory leaks X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7d5e79ffb9664e89432f67959402d1b3226c9ec9;p=libvirt.git tests: plug memory leaks * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Don't allocate, since we don't use virDomainChrDefFree. --- diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index db2d00657f..5387432f41 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -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 |