From patchwork Thu Apr 9 14:12:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11481855 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 887201744 for ; Thu, 9 Apr 2020 14:15:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C82120771 for ; Thu, 9 Apr 2020 14:15:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C82120771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMXvK-0002oV-Ca; Thu, 09 Apr 2020 14:12:54 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMXvI-0002oI-RA for xen-devel@lists.xenproject.org; Thu, 09 Apr 2020 14:12:52 +0000 X-Inumbo-ID: 2efc5962-7a6c-11ea-82d6-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2efc5962-7a6c-11ea-82d6-12813bfff9fa; Thu, 09 Apr 2020 14:12:45 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E6972AD72; Thu, 9 Apr 2020 14:12:43 +0000 (UTC) From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Subject: [PATCH 1/3] mini-os: fix double free() in netfront Date: Thu, 9 Apr 2020 16:12:38 +0200 Message-Id: <20200409141240.28876-2-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200409141240.28876-1-jgross@suse.com> References: <20200409141240.28876-1-jgross@suse.com> X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , samuel.thibault@ens-lyon.org, wl@xen.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Commit d225f4012d69a19 ("Save/Restore Support: Add suspend/restore support for netfront") introduced a regression in form of freeing a netfront device structure twice. Fix that. Coverity-ID: 1433637 Fixes: d225f4012d69a19 ("Save/Restore Support: Add suspend/restore support for netfront") Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- netfront.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/netfront.c b/netfront.c index 50b3a57..fe7bb62 100644 --- a/netfront.c +++ b/netfront.c @@ -584,8 +584,6 @@ void shutdown_netfront(struct netfront_dev *dev) list->refcount--; if (list->refcount == 0) { _shutdown_netfront(dev); - free(dev->nodename); - free(dev); to_del = list; if (to_del == dev_list) {