mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 17:05:16 +00:00
security_apparmor: fix memleaks in AppArmorSetFDLabel
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> Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
c97766a639
commit
76b9227eea
@ -1109,8 +1109,8 @@ AppArmorSetFDLabel(virSecurityManager *mgr,
|
|||||||
virDomainDef *def,
|
virDomainDef *def,
|
||||||
int fd)
|
int fd)
|
||||||
{
|
{
|
||||||
char *proc = NULL;
|
g_autofree char *proc = NULL;
|
||||||
char *fd_path = NULL;
|
g_autofree char *fd_path = NULL;
|
||||||
|
|
||||||
virSecurityLabelDef *secdef =
|
virSecurityLabelDef *secdef =
|
||||||
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user