提交 ca250269 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 fb0bdb61
...@@ -137,6 +137,7 @@ virSecurityDACChownListFree(void *opaque) ...@@ -137,6 +137,7 @@ virSecurityDACChownListFree(void *opaque)
VIR_FREE(list->items[i]->path); VIR_FREE(list->items[i]->path);
VIR_FREE(list->items[i]); VIR_FREE(list->items[i]);
} }
VIR_FREE(list->items);
VIR_FREE(list); VIR_FREE(list);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册