[PATCH 2/4] launch: libvirt: free format string
30 Apr
2018
30 Apr
'18
11:07 a.m.
When the result guestfs_disk_format() is not known, free the string before returning an error. --- lib/launch-libvirt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index e4961f201..844023b80 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -197,6 +197,7 @@ get_source_format_or_autodetect (guestfs_h *g, struct drive *drv) error (g, _("could not auto-detect the format.\n" "If the format is known, pass the format to libguestfs, eg. using the\n" "‘--format’ option, or via the optional ‘format’ argument to ‘add-drive’.")); + free (format); return NULL; } -- 2.14.3
3106
Age (days ago)
3106
Last active (days ago)
0 comments
1 participants
participants (1)
-
Pino Toscano