提交 696a9faa 编写于 作者: M Michal Privoznik

lxc: Don't leak @veths in virLXCProcessStart

The individual strings are freed, but the array is never freed.

 8 bytes in 1 blocks are definitely lost in loss record 28 of 1,098
    at 0x4C2CE3F: malloc (vg_replace_malloc.c:298)
    by 0x4C2F1BF: realloc (vg_replace_malloc.c:785)
    by 0x52C9C92: virReallocN (viralloc.c:245)
    by 0x52C9D88: virExpandN (viralloc.c:294)
    by 0x23414D99: virLXCProcessSetupInterfaces (lxc_process.c:552)
    by 0x23417457: virLXCProcessStart (lxc_process.c:1356)
    by 0x2341F71C: lxcDomainCreateWithFiles (lxc_driver.c:1088)
    by 0x2341F805: lxcDomainCreate (lxc_driver.c:1123)
    by 0x55917EB: virDomainCreate (libvirt-domain.c:6534)
    by 0x1367D1: remoteDispatchDomainCreate (remote_daemon_dispatch_stubs.h:4434)
    by 0x1366EA: remoteDispatchDomainCreateHelper (remote_daemon_dispatch_stubs.h:4410)
    by 0x546FDF1: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 9bf5ca86
......@@ -1559,6 +1559,7 @@ int virLXCProcessStart(virConnectPtr conn,
virCommandFree(cmd);
for (i = 0; i < nveths; i++)
VIR_FREE(veths[i]);
VIR_FREE(veths);
for (i = 0; i < nttyFDs; i++)
VIR_FORCE_CLOSE(ttyFDs[i]);
VIR_FREE(ttyFDs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册