Received: from eggs.gnu.org ([2001:4830:134:3::10]:44078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agAXW-0007gy-HV for qemu-devel@nongnu.org; Wed, 16 Mar 2016 08:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agAXV-0001N2-KK for qemu-devel@nongnu.org; Wed, 16 Mar 2016 08:27:02 -0400 From: Markus Armbruster References: <1458123417-7735-1-git-send-email-kwolf@redhat.com> Date: Wed, 16 Mar 2016 13:26:52 +0100 In-Reply-To: <1458123417-7735-1-git-send-email-kwolf@redhat.com> (Kevin Wolf's message of "Wed, 16 Mar 2016 11:16:57 +0100") Message-ID: <87lh5isj5f.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] block: Fix memory leak in hmp_drive_add_node() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org Kevin Wolf writes: > hmp_drive_add_node() leaked qdict in the error path when no node-name is > specified. > > Signed-off-by: Kevin Wolf > --- > blockdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/blockdev.c b/blockdev.c > index e7b8676..50410bf 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -3898,6 +3898,7 @@ void hmp_drive_add_node(Monitor *mon, const char *optstr) > qdict = qemu_opts_to_qdict(opts, NULL); > > if (!qdict_get_try_str(qdict, "node-name")) { > + QDECREF(qdict); > error_report("'node-name' needs to be specified"); > goto out; > } Reviewed-by: Markus Armbruster