Pino Toscano
2018-Apr-30 11:07 UTC
[Libguestfs] [PATCH 2/4] launch: libvirt: free format string
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
Seemingly Similar Threads
- [PATCH] launch: libvirt: Autodetect backing format for drive overlays (RHBZ#1354335).
- Re: [PATCH v2] launch: add support for autodetection of appliance image format
- [PATCH] launch: libvirt: do not leak the backend string on error
- [PATCH] tests: regressions: make test-big-heap use a temporary empty file
- Re: [PATCH] tests: regressions: make test-big-heap use a temporary empty file