aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-12 17:26:47 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-03-17 14:11:43 +0100
commit988e0f06621fde11ec0d319a6fd0ab3ccef0602f (patch)
tree484232d41e727b0d701bcb13f4fe943365c297da /monitor.c
parentbcf5d19c59a527c91bc29704f3e4956119c050cf (diff)
monitor: Plug memory leak in monitor_read_bdrv_key_start()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 1b46d0718d..bc774152a1 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));