Commit id '
4b75237f' seems to have triggered Coverity into finding
at least one memory leak in xen_xl.c for error path for cleanup where
the listenAddr would be leaked. Reviewing other callers, it seems that
qemu_parse_command.c would have the same issue, so just it too.
{
int ret = -1;
virDomainGraphicsDefPtr vnc = NULL;
+ char *listenAddr = NULL;
char *tmp;
if (VIR_ALLOC(vnc) < 0)
char *opts;
char *port;
const char *sep = ":";
- char *listenAddr = NULL;
if (val[0] == '[')
sep = "]:";
tmp = strstr(val, sep);
cleanup:
virDomainGraphicsDefFree(vnc);
+ VIR_FREE(listenAddr);
return ret;
}
return 0;
cleanup:
+ VIR_FREE(listenAddr);
virDomainGraphicsDefFree(graphics);
return -1;
}