mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
parthelper: Don't leak @canonical_path
The @canonical_path variable holds canonicalized path passed as argv[1]. The canonicalized path is obtained either via virFileResolveLink() or plain g_strdup(). Nevertheless, in both cases it must be freed. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
3b8deb9603
commit
db8e747af9
@ -62,7 +62,7 @@ int main(int argc, char **argv)
|
|||||||
PedPartition *part;
|
PedPartition *part;
|
||||||
int cmd = DISK_LAYOUT;
|
int cmd = DISK_LAYOUT;
|
||||||
const char *path;
|
const char *path;
|
||||||
char *canonical_path;
|
g_autofree char *canonical_path = NULL;
|
||||||
const char *partsep;
|
const char *partsep;
|
||||||
bool devmap_partsep = false;
|
bool devmap_partsep = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user