diff --git a/lib/drives.c b/lib/drives.c index 6a62623d5..edb1e060f 100644 --- a/lib/drives.c +++ b/lib/drives.c @@ -820,6 +820,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, /* ... else the old hotplugging case */ error (g, _("hotplugging support was removed in libguestfs 1.48")); + free_drive_struct (drv); return -1; }