
On 11/13/24 07:28, Georgia Garcia wrote:
proc and fd_path are allocated but never freed. Fix by using g_autofree instead.
Fixes: b9757fea30785a92aa95ea675b9bc371e4fb2e8c Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com> --- src/security/security_apparmor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Jim Fehlig <jfehlig@suse.com> Regards, Jim
diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 07e95ec81d..7092724563 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -1107,8 +1107,8 @@ AppArmorSetFDLabel(virSecurityManager *mgr, virDomainDef *def, int fd) { - char *proc = NULL; - char *fd_path = NULL; + g_autofree char *proc = NULL; + g_autofree char *fd_path = NULL;
virSecurityLabelDef *secdef = virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);