mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virSecuritySELinuxContextListAppend: Remove unreachable cleanup
'item' is always NULLed-out by VIR_APPEND_ELEMENT and 'ret' variable is always 0 when used so both can be removed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
966ba852b7
commit
4e7576a741
@ -114,7 +114,6 @@ virSecuritySELinuxContextListAppend(virSecuritySELinuxContextList *list,
|
|||||||
bool remember,
|
bool remember,
|
||||||
bool restore)
|
bool restore)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
virSecuritySELinuxContextItem *item = NULL;
|
virSecuritySELinuxContextItem *item = NULL;
|
||||||
|
|
||||||
item = g_new0(virSecuritySELinuxContextItem, 1);
|
item = g_new0(virSecuritySELinuxContextItem, 1);
|
||||||
@ -127,9 +126,7 @@ virSecuritySELinuxContextListAppend(virSecuritySELinuxContextList *list,
|
|||||||
|
|
||||||
VIR_APPEND_ELEMENT(list->items, list->nItems, item);
|
VIR_APPEND_ELEMENT(list->items, list->nItems, item);
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
virSecuritySELinuxContextItemFree(item);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user