]> git.proxmox.com Git - mirror_qemu.git/commitdiff
monitor: Plug memory leak in monitor_read_bdrv_key_start()
authorMarkus Armbruster <armbru@redhat.com>
Thu, 12 Mar 2015 16:26:47 +0000 (17:26 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 17 Mar 2015 13:11:43 +0000 (14:11 +0100)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
monitor.c

index 1b46d0718d5132b0f462e468c03fd133f8ca59fb..bc774152a105e48a33dd0e1b5eb9efec7e98789c 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -5391,9 +5391,11 @@ int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
 
     if (monitor_ctrl_mode(mon)) {
         qerror_report_err(local_err);
+        error_free(local_err);
         return -1;
     }
 
+    error_free(local_err);
     monitor_printf(mon, "%s (%s) is encrypted.\n", bdrv_get_device_name(bs),
                    bdrv_get_encrypted_filename(bs));