From: Markus Armbruster <arm...@redhat.com>

Signed-off-by: Markus Armbruster <arm...@redhat.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
---
 monitor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/monitor.c b/monitor.c
index 1b46d07..bc77415 100644
--- 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));
 
-- 
1.8.3.1


Reply via email to