mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemuDomainAttachDeviceMknodHelper: Don't leak data->target
It's not really a problem since this is a helper process that dies as soon as the helper function returns, but the cleanup code will be replaced with a function soon and this change prepares the code for that. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9d8d42137a
commit
759921d47c
@ -1102,7 +1102,7 @@ struct qemuDomainAttachDeviceMknodData {
|
|||||||
virQEMUDriverPtr driver;
|
virQEMUDriverPtr driver;
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
const char *file;
|
const char *file;
|
||||||
const char *target;
|
char *target;
|
||||||
GStatBuf sb;
|
GStatBuf sb;
|
||||||
void *acl;
|
void *acl;
|
||||||
#ifdef WITH_SELINUX
|
#ifdef WITH_SELINUX
|
||||||
@ -1248,6 +1248,7 @@ qemuDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNUSED,
|
|||||||
freecon(data->tcon);
|
freecon(data->tcon);
|
||||||
# endif
|
# endif
|
||||||
virFileFreeACLs(&data->acl);
|
virFileFreeACLs(&data->acl);
|
||||||
|
VIR_FREE(data->target);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user