mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 03:42:19 +00:00
parallels: Need to free memory on error path
This commit is contained in:
parent
3fa23653ee
commit
7f94521703
@ -135,8 +135,10 @@ parallelsAddFileExt(const char *path, const char *ext)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!virStrcpy(new_path, path, len))
|
if (!virStrcpy(new_path, path, len)) {
|
||||||
|
VIR_FREE(new_path);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
strcat(new_path, ext);
|
strcat(new_path, ext);
|
||||||
|
|
||||||
return new_path;
|
return new_path;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user