From 72a8b8ecc5bc4573035e0c1b5f6824edbe128e37 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 26 Sep 2018 09:19:31 +0200 Subject: [PATCH] virSecuritySELinuxContextListFree: Don't leak list->items This array is allocated in virSecuritySELinuxContextListAppend() but never freed. This commit is essentially the same as ca25026. Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- src/security/security_selinux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 056637e4cb..015abc29f5 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -156,6 +156,7 @@ virSecuritySELinuxContextListFree(void *opaque) for (i = 0; i < list->nItems; i++) virSecuritySELinuxContextItemFree(list->items[i]); + VIR_FREE(list->items); VIR_FREE(list); }