mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
conf: Fix memory leak in openvzReadFSConf
Since 1f5deed9
, @veid_str has been leaked in the error path.
Found by Coverity.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
dd0e292992
commit
40ef01697f
@ -330,7 +330,7 @@ openvzReadFSConf(virDomainDefPtr def,
|
||||
{
|
||||
int ret;
|
||||
virDomainFSDefPtr fs = NULL;
|
||||
char *veid_str = NULL;
|
||||
g_autofree char *veid_str = NULL;
|
||||
char *temp = NULL;
|
||||
const char *param;
|
||||
unsigned long long barrier, limit;
|
||||
@ -365,8 +365,6 @@ openvzReadFSConf(virDomainDefPtr def,
|
||||
fs->type = VIR_DOMAIN_FS_TYPE_MOUNT;
|
||||
if (!(fs->src->path = virStringReplace(temp, "$VEID", veid_str)))
|
||||
goto error;
|
||||
|
||||
VIR_FREE(veid_str);
|
||||
}
|
||||
|
||||
fs->dst = g_strdup("/");
|
||||
|
Loading…
Reference in New Issue
Block a user