From nobody Sun May 11 21:38:21 2025 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719951676; cv=none; d=zohomail.com; s=zohoarc; b=PEb5rrVloUhFuyoA5kvPSsN/QSQE5UZGUgfbX5DA3tqfhmaU0Godmozp2fKYOlGwHTKV71+EBCqmzMw00DuQe4gxW72cRhg+1El4ejPlJb24iIXsCGIKNFrle4ufrmpznvZlh0V8E6muOJ9HwgmfXIsGQ0WfNq0/Y0pszLeSLpQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719951676; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=y6iaejVuyK6cotgddPWIYQA8dIBm4KoXB6zsOD2vQwU=; b=VnJND5tPhosTtuWQA0AHxJjb4RKBqa4a8VIyE7wbxipxA/QN6GWwzXScNAfniptAUHNPUMP3+8+ugpyoTL+wQGMCmTHNwc1c/7NGrw1fkwx/AG8Yu2axIH+e+rQ8+M/6x2ZVfAPv4PgAQ/Xvtj4MLKeJjzV37LedUekSuqR67Zg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719951676680624.403043066813; Tue, 2 Jul 2024 13:21:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOjxu-0006By-Cq; Tue, 02 Jul 2024 16:19:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOjx7-0004l6-Sk for qemu-devel@nongnu.org; Tue, 02 Jul 2024 16:18:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOjx2-00008p-2I for qemu-devel@nongnu.org; Tue, 02 Jul 2024 16:18:13 -0400 Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-267-9PLUARK1MwuIK2BDPi0fNw-1; Tue, 02 Jul 2024 16:18:04 -0400 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-52e6e454663so5143131e87.1 for ; Tue, 02 Jul 2024 13:18:03 -0700 (PDT) Received: from redhat.com ([2a02:14f:1f5:eadd:8c31:db01:9d01:7604]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af5b91bsm212132365e9.20.2024.07.02.13.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 13:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719951486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y6iaejVuyK6cotgddPWIYQA8dIBm4KoXB6zsOD2vQwU=; b=gz4CyTkXu6NFTBCyTcOutvCrpA36d7ncHg9UGi7fPZfgJ1J5A6bV4KLnEY2rM+dDS19rpA zCpeQp+tCwr3c5LiOMKg55CCCn5O3z6bVqCgM5nFvrNBHWvvz5gG5DZJtfUv7BpRBUbDVA HP8bzE99NPNjVQd46blP0gMvaP8LZjs= X-MC-Unique: 9PLUARK1MwuIK2BDPi0fNw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719951482; x=1720556282; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=y6iaejVuyK6cotgddPWIYQA8dIBm4KoXB6zsOD2vQwU=; b=oqbSI7gUQbP3EKXahaxoSHExu7ENpgudhdkyxpeG7KFnQL/JmooUjL26ud/1JblDfX 440tXVouShKGOms5pJj0WoSxN0YZqKyM1skGRsL/erOYOHdi8wClHidmWQQ4s6Umi+Cr r+U3lTqYf04EPDKvbdPZVZpz1+51JkqSgDA+MSrOBM4xOFNGrT58QxRdiCruYaL1eBfc 8GAJbshG4j+ogBzHN0SnDT1yd06QYD7Da6Y8IFzuJeve/wCE7XVNKpTBFZ+IIg7pzj3Q Q7doKl0QdwI/vKFTCasP2oC3ZV+GMS5UNG+lc7uDsyEPBgXqO8qZmkwuOZJlppAOJyg3 eg/w== X-Gm-Message-State: AOJu0YxCWaENVevNQKX3AX1b4OEW8UWRBXfEO4WYRslS71xOTbeCWQZH xjWyZKYrhGMnT2ZByKBpzULZuKqCsmmMFxTrjvFqYmiZymnMXOuGaaPBcI2iY+F9BTvcpDBDVpM tP8H88lrwlfv2+CMyWZm7+ySeZBqiFeRaX1AoxIrtyUZfX3Hz4VO6ROqRryVnJuiFa7VSHF9zWe BJwgfY5BruqUQLtSgz6F54SS6zz5dC1g== X-Received: by 2002:a05:6512:3b22:b0:52c:e054:4149 with SMTP id 2adb3069b0e04-52e8266126bmr7225050e87.15.1719951481800; Tue, 02 Jul 2024 13:18:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGI6GGzaQcQC3IYyIpMnGjN7/+7qQYaiTuwSi243O0DLiqTfHVDIGPiLQ1+OcbiSJ5EN7AFmQ== X-Received: by 2002:a05:6512:3b22:b0:52c:e054:4149 with SMTP id 2adb3069b0e04-52e8266126bmr7225036e87.15.1719951481197; Tue, 02 Jul 2024 13:18:01 -0700 (PDT) Date: Tue, 2 Jul 2024 16:17:57 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Akihiko Odaki , Alex =?utf-8?Q?Benn=C3=A9e?= Subject: [PULL v2 42/88] hw/virtio: Free vqs after vhost_dev_cleanup() Message-ID: <25b8a0f40c7f408442c5fd4da195fce9997cfb78.1719951168.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719951677599100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki This fixes LeakSanitizer warnings. Signed-off-by: Akihiko Odaki Message-Id: <20240627-san-v2-7-750bb0946dbd@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user-base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/vhost-user-base.c b/hw/virtio/vhost-user-base.c index 11e72b1e3b..2bc3423326 100644 --- a/hw/virtio/vhost-user-base.c +++ b/hw/virtio/vhost-user-base.c @@ -223,6 +223,7 @@ static void vub_disconnect(DeviceState *dev) { VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); VHostUserBase *vub =3D VHOST_USER_BASE(vdev); + struct vhost_virtqueue *vhost_vqs =3D vub->vhost_dev.vqs; =20 if (!vub->connected) { goto done; @@ -231,6 +232,7 @@ static void vub_disconnect(DeviceState *dev) =20 vub_stop(vdev); vhost_dev_cleanup(&vub->vhost_dev); + g_free(vhost_vqs); =20 done: /* Re-instate the event handler for new connections */ --=20 MST