From patchwork Mon May 26 17:37:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 352588 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B4A77140083 for ; Tue, 27 May 2014 03:39:36 +1000 (EST) Received: from localhost ([::1]:57841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Woys2-00067l-7S for incoming@patchwork.ozlabs.org; Mon, 26 May 2014 13:39:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Woyq0-0003RR-IV for qemu-devel@nongnu.org; Mon, 26 May 2014 13:37:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Woypt-0003HB-V9 for qemu-devel@nongnu.org; Mon, 26 May 2014 13:37:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Woypt-0003Gh-Mi; Mon, 26 May 2014 13:37:21 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4QHbLSF014725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 26 May 2014 13:37:21 -0400 Received: from blackfin.pond.sub.org (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4QHbJuZ008754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 May 2014 13:37:20 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 08C8A303FEB1; Mon, 26 May 2014 19:37:16 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 26 May 2014 19:37:11 +0200 Message-Id: <1401125835-21765-11-git-send-email-armbru@redhat.com> In-Reply-To: <1401125835-21765-1-git-send-email-armbru@redhat.com> References: <1401125835-21765-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-stable@nongnu.org, stefanha@redhat.com Subject: [Qemu-devel] [PATCH 10/14] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Introduced in commit a8d8ecb. Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Benoit Canet --- block/qapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qapi.c b/block/qapi.c index 75f44f1..97e1641 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -475,6 +475,7 @@ static void dump_qobject(fprintf_function func_fprintf, void *f, case QTYPE_QERROR: { QString *value = qerror_human((QError *)obj); func_fprintf(f, "%s", qstring_get_str(value)); + QDECREF(value); break; } case QTYPE_NONE: