From nobody Sun Feb 8 14:51:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1606913052; cv=none; d=zohomail.com; s=zohoarc; b=kbFY8ciDGlUm6hdJKl6g8smh8rqMIxNsixAeGn7sukcsgTCRlb6ZdKnauJ89PYy6boZw2TZkt4i/pYW1kCOpWnQIFLlVvT6WrLcEwQfEXapPE1QQ1l32PZbRfy11d5XKNKxWCfV2FoKpdBPbu25qnunpwKopyIc8fnsxrdsiWcY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606913052; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4w9eRY5ZdT3ZaRg8xGSwuGnBTGHJhy35CBQsgAnhCMg=; b=X50SLasEBreWvTAvLkHWisnRyF/WQxFIxmY2qnUXoUeArMqDP8nHPmjDfDkxN3jvt73QxI/sy4h8GpI1dxRiseT3i0XsZQJ5JlvzcK0JgOn5+K+PXMx9Hs7aOOT8sFIG5hDTmhp9tlGnliwBmdbgdh6r+3BCrccea622m7TImCg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 160691305241923.96151373742373; Wed, 2 Dec 2020 04:44:12 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-292-vvruvsPqO3CUNtKT85gTGA-1; Wed, 02 Dec 2020 07:44:09 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4467D420F4; Wed, 2 Dec 2020 12:44:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 125185D6AC; Wed, 2 Dec 2020 12:44:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CE0441809CA0; Wed, 2 Dec 2020 12:44:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0B2ChQa0003670 for ; Wed, 2 Dec 2020 07:43:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 81C7D60BFA; Wed, 2 Dec 2020 12:43:26 +0000 (UTC) Received: from fedora.redhat.com (ovpn-112-197.phx2.redhat.com [10.3.112.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43C0060C0F for ; Wed, 2 Dec 2020 12:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606913051; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=4w9eRY5ZdT3ZaRg8xGSwuGnBTGHJhy35CBQsgAnhCMg=; b=Xs9SMw8muWbD5pnMc1PM5q+rYIUQHzng4NoCqsyOme+EXqvmNJbxxcBDQ4Ln//fpBbHBQN oO+svWLua6VpVHNegHZT/sqNH6zNVpAFlfr0lS9kzJ4Ge7J7r2Uhw2Ytuu5zIS1VBFlLgk Rv5GVrYsBOb2yAMwiUN1eNu+NKlzAv8= X-MC-Unique: vvruvsPqO3CUNtKT85gTGA-1 From: John Ferlan To: libvir-list@redhat.com Subject: [PATCH 1/7] util: Fix memory leak in virNetDevOpenvswitchInterfaceGetMaster Date: Wed, 2 Dec 2020 07:43:15 -0500 Message-Id: <20201202124321.765271-2-jferlan@redhat.com> In-Reply-To: <20201202124321.765271-1-jferlan@redhat.com> References: <20201202124321.765271-1-jferlan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Since 032548c4 @cmd was never autofree'd. Perhaps as a result of VIR_AUTOPTR type changes occurring at roughly the same time so the copy pasta missed this. Found by Coverity. Signed-off-by: John Ferlan Reviewed-by: J=C3=A1n Tomko --- src/util/virnetdevopenvswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index 7452527f49..d380b0cf22 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -428,7 +428,7 @@ virNetDevOpenvswitchInterfaceStats(const char *ifname, int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master) { - virCommandPtr cmd =3D virNetDevOpenvswitchCreateCmd(); + g_autoptr(virCommand) cmd =3D virNetDevOpenvswitchCreateCmd(); int exitstatus; =20 *master =3D NULL; --=20 2.28.0