From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW5wm-0004ZQ-Ls for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:26:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YW5wl-0001lY-JE for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:26:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW5wl-0001km-3P for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:26:55 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2CGQrDm014041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 12 Mar 2015 12:26:54 -0400 From: Markus Armbruster Date: Thu, 12 Mar 2015 17:26:47 +0100 Message-Id: <1426177610-4848-3-git-send-email-armbru@redhat.com> In-Reply-To: <1426177610-4848-1-git-send-email-armbru@redhat.com> References: <1426177610-4848-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 2/5] monitor: Plug memory leak in monitor_read_bdrv_key_start() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kraxel@redhat.com, lcapitulino@redhat.com Signed-off-by: Markus Armbruster --- monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitor.c b/monitor.c index 29c930a..12d80a1 100644 --- a/monitor.c +++ b/monitor.c @@ -5390,9 +5390,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.9.3