From patchwork Mon Oct 31 17:51:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashijeet Acharya X-Patchwork-Id: 9406257 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 2045960234 for ; Mon, 31 Oct 2016 18:31:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14E2C28E60 for ; Mon, 31 Oct 2016 18:31:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 089A329353; Mon, 31 Oct 2016 18:31:33 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 AF38C28E60 for ; Mon, 31 Oct 2016 18:31:32 +0000 (UTC) Received: from localhost ([::1]:37771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1HMp-0001sh-Ua for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Oct 2016 14:31:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Gmu-0000yj-Uv for qemu-devel@nongnu.org; Mon, 31 Oct 2016 13:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1Gmr-0007hz-Mk for qemu-devel@nongnu.org; Mon, 31 Oct 2016 13:54:25 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:32993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1Gmr-0007hv-GI; Mon, 31 Oct 2016 13:54:21 -0400 Received: by mail-pf0-x243.google.com with SMTP id a136so5910421pfa.0; Mon, 31 Oct 2016 10:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=UZRSh5RnrTOKR0IkZM7nv9t+fO5ZEPm2eaIP1Z6vyFI=; b=AAAMs2Gr7OmCjoFWmK8JBZ9R19mG3gBG1wuz+Og8GsG2bftjjFQlt6kjLgBn8mAykg QXPFmNdCTHZ9JXo25MPLaQkWlMJSIu5lxs6knAuud0BBvOMeM3EP80ULy/u4hk6uVfJM I0DiBX90iSUxig8AcHwDE+Cm4Bvdf0PMT1XsSBlCBLXQhddZwZG0FANHYx/eDY89+YPO d0AaE2l/kFHdB844IgnClslPMkDE/Ou9tdcKPIC+NKeybzDa/ylU+vPYw/v14TMfiuwr MDGEC6L+KZfNypYF9v7MHpWtyphwWptyMZ6Tx11FkSaNLF3ImsdayNiRsWOp5/Kltbo3 0+pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UZRSh5RnrTOKR0IkZM7nv9t+fO5ZEPm2eaIP1Z6vyFI=; b=iP5IUTQ+csnbDsOJKbutq+cRCDuCoQ/pdu8LuzxjTGGZkTLuMAwUJMfwNn0/u74kCX ymK7/bnv6ulINStqfwsMfpLryS6ll22y010OOpZJO5lJkfaiAo8i3KXEwVYTuDuQU8rc Xn69I4t1r9TjIK9APScuBYHb6I4MosFioC9+c68E9nCtCqHTRzTKh8JezasCpfGa4jZt n4A+7UCJBzoqFX7Jg62hvxqK+vgFHdyLKpqSGhZ8N28QhgdZLqjMkKuR0/PQCHU1ntZ1 CLzRd3ONUgooF4pefYDjr3dYrqZwtQhm04rbI0/4w+GghkUPzGFvFsJs4cENCgMWQK2Q cb+Q== X-Gm-Message-State: ABUngvfS4Z59F5UOzr8V4q3yWTUTdUc/cJB3/BX62uKa6YYf5p8DLalASlFGIrF5CWj0cw== X-Received: by 10.99.141.193 with SMTP id z184mr42795048pgd.23.1477936459993; Mon, 31 Oct 2016 10:54:19 -0700 (PDT) Received: from linux.local ([47.247.61.135]) by smtp.gmail.com with ESMTPSA id s64sm36963150pfk.81.2016.10.31.10.54.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Oct 2016 10:54:19 -0700 (PDT) From: Ashijeet Acharya To: kwolf@redhat.com Date: Mon, 31 Oct 2016 23:21:33 +0530 Message-Id: <1477936293-17643-1-git-send-email-ashijeetacharya@gmail.com> X-Mailer: git-send-email 2.6.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::243 Subject: [Qemu-devel] [PATCH] block/nbd: Fix the regression to free leaked visitor 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: pbonzini@redhat.com, Ashijeet Acharya , qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch frees the leaked visitor in nbd_refresh_filename() and uses visit_free() to fix it. Signed-off-by: Ashijeet Acharya Reviewed-by: Eric Blake --- block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nbd.c b/block/nbd.c index 8ef1438..ff9d01a 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -545,6 +545,7 @@ static void nbd_refresh_filename(BlockDriverState *bs, QDict *options) qdict_put(opts, "tls-creds", qstring_from_str(s->tlscredsid)); } + visit_free(ov); qdict_flatten(opts); bs->full_open_options = opts; }