From nobody Fri May 3 21:18:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1627901155; cv=none; d=zohomail.com; s=zohoarc; b=dgomjf6F++VUzgV91HYHaOGCtUT6eAr9rP7c9Md7L5mU4UQMAVIDWHTMNzsAkEDhp7uyBq0171yl0GTfv+IvhplaQClmOTgyFy44aaq2W3aIlAaLmCu3P9LB8v5dF35pNeZAFgsWJZ/VT16dLW0s3CnsP7PblF32yHyMNE7kGjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627901155; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=i/ZZHI85YQ2iQz3W+6rOE6GK4v8VTvuVHn0ddimSCis=; b=VYqPP2bTiw5ZRTLitqtZ3AKJiYs6I6XoefDAu2NFk9rbWmh4nEpMLjxciE706tm1Hp3DlGXxd3EwVhVKe7k8hfGO6LN6AY7kgat1Y3Q37sXp7aE0vLDSXbXuQSKuXqu7ERjU7YB/eh9fHSCB4ppV/r8o9xBLmhE2EUnVI363Zws= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1627901155010707.0348597168777; Mon, 2 Aug 2021 03:45:55 -0700 (PDT) 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-584-_Pc5qWp-OEmvBY7UUhkifQ-1; Mon, 02 Aug 2021 06:45:52 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F300C73A0; Mon, 2 Aug 2021 10:45:47 +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 E7D9E19C59; Mon, 2 Aug 2021 10:45:45 +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 19EC7180BAB1; Mon, 2 Aug 2021 10:45:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 172Ajhur011344 for ; Mon, 2 Aug 2021 06:45:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 359711017CE5; Mon, 2 Aug 2021 10:45:43 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADF421002D71 for ; Mon, 2 Aug 2021 10:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627901153; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=i/ZZHI85YQ2iQz3W+6rOE6GK4v8VTvuVHn0ddimSCis=; b=jNTpEQGQvDMwBrAZ2rZ7wnY8fVCwo5UvUNJs21/1H9g+KzWlxZu08uCjL6zu/JfKwCf5ga yb6jG/IQKr2iAjFjBv3/1luBCg/5i5ZvanxoUKrpMUxMiAOD0JbpPeBcKHL5tP0kVafR7z X9+OP+qAVb8J4UNnClTOU1TyQrAicIU= X-MC-Unique: _Pc5qWp-OEmvBY7UUhkifQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] testutils: Don't leak @testBitmap and @failedTests Date: Mon, 2 Aug 2021 12:45:37 +0200 Message-Id: <3a7183f7a05348098328ee3eef87ee2cb2fa8d1b.1627901127.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.23 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) X-ZM-MESSAGEID: 1627901156155100001 Content-Type: text/plain; charset="utf-8" In virTestMain() the @failedTests bitmap is allocated and optionally @testBitmap too. But neither of them is freed. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/testutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testutils.c b/tests/testutils.c index 7d87e30a5c..58d3300998 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -856,6 +856,9 @@ int virTestMain(int argc, fprintf(stderr, "Some tests failed. Run them using:\n"); fprintf(stderr, "VIR_TEST_DEBUG=3D1 VIR_TEST_RANGE=3D%s %s\n", fai= led, argv[0]); } + + virBitmapFree(testBitmap); + virBitmapFree(failedTests); virLogReset(); return ret; } --=20 2.31.1