From patchwork Mon Jul 31 10:21:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 9871585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F101C60365 for ; Mon, 31 Jul 2017 10:59:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE0BB28563 for ; Mon, 31 Jul 2017 10:59:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFCC828599; Mon, 31 Jul 2017 10:59:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4E3A928563 for ; Mon, 31 Jul 2017 10:59:31 +0000 (UTC) Received: from localhost ([::1]:58719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dc8P8-0004te-HI for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 06:58:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dc8Nx-0004tI-JO for qemu-devel@nongnu.org; Mon, 31 Jul 2017 06:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dc8Ns-0004hM-Q4 for qemu-devel@nongnu.org; Mon, 31 Jul 2017 06:57:17 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:42003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dc8Ns-0004ew-Hf; Mon, 31 Jul 2017 06:57:12 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 2F8D342AC3; Mon, 31 Jul 2017 13:57:09 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 83277B77; Mon, 31 Jul 2017 13:21:44 +0300 (MSK) Received: (nullmailer pid 5540 invoked by uid 1000); Mon, 31 Jul 2017 10:21:45 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 31 Jul 2017 13:21:20 +0300 Message-Id: <80792eb9257588d9a554605f3411cbc7ed51e9bc.1501496349.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 01/25] tests: check-qom-proplist: fix leak X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Michael Tokarev Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Marc-André Lureau user_creatable_add_opts() returns a reference (the other reference is for the root parent/child link). Leak introduced in commit a1af255f065cc. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- tests/check-qom-proplist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index 432b66585f..c51e6e734d 100644 --- a/tests/check-qom-proplist.c +++ b/tests/check-qom-proplist.c @@ -428,6 +428,8 @@ static void test_dummy_createcmdl(void) g_assert(err == NULL); error_free(err); + object_unref(OBJECT(dobj)); + /* * cmdline-parsing via qemu_opts_parse() results in a QemuOpts entry * corresponding to the Object's ID to be added to the QemuOptsList