mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
virSecurityDACChownListFree: Don't leak list->items array
We're freeing individual items in it but not the array itself. ==19200== 40 bytes in 1 blocks are definitely lost in loss record 847 of 1,059 ==19200== at 0x4C2D12F: realloc (vg_replace_malloc.c:785) ==19200== by 0x52C5532: virReallocN (viralloc.c:245) ==19200== by 0x52C5628: virExpandN (viralloc.c:294) ==19200== by 0x52C58FC: virInsertElementsN (viralloc.c:436) ==19200== by 0x542856B: virSecurityDACChownListAppend (security_dac.c:115) ==19200== by 0x54286B4: virSecurityDACTransactionAppend (security_dac.c:167) ==19200== by 0x542902F: virSecurityDACSetOwnershipInternal (security_dac.c:560) ==19200== by 0x54295D6: virSecurityDACSetOwnership (security_dac.c:650) ==19200== by 0x542AEE0: virSecurityDACSetInputLabel (security_dac.c:1472) ==19200== by 0x542B61D: virSecurityDACSetAllLabel (security_dac.c:1693) ==19200== by 0x542DD67: virSecurityManagerSetAllLabel (security_manager.c:869) ==19200== by 0x54279C2: virSecurityStackSetAllLabel (security_stack.c:361) Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
fb0bdb6167
commit
ca250269b0
@ -137,6 +137,7 @@ virSecurityDACChownListFree(void *opaque)
|
||||
VIR_FREE(list->items[i]->path);
|
||||
VIR_FREE(list->items[i]);
|
||||
}
|
||||
VIR_FREE(list->items);
|
||||
VIR_FREE(list);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user