mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
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: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
9bf5ca8620
commit
696a9faa8e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user