From nobody Thu Apr 2 18:59:40 2026 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 506276FC5 for ; Thu, 12 Feb 2026 01:14:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858878; cv=none; b=CJ4xjqrI2AtVeoXVuFQioAwTW6ZLE8w/0JwZd1wd5kq07f9D9z2OFKnQYcY8LM0cugpQC+eiDULswIFJrUmaycveSSwnufNT6V/aVYo+Y4bCOueonlrQMNs3JDKfLT1EG/fiMPhUcWLuDW5PZAzuD+ZXfRgOajwUpVDch2mQQos= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858878; c=relaxed/simple; bh=Oohu9IsctUk6dZrEbLhnkff8ZOoO0y7lszSYXVT5uiY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eBCpXoRUjUvuPG5DU57x/kKtKUy3Gg+A/XxwyHbOy6DhBbxWZAoTkJsz3OyrqFKDm+U/KVcps8LyOhZIViXe3Ow4L8EFJ/ppFGNbMELjTgEaMkY63M9dIFWWx5ZLTQsRoUZTn0Zo8Xy8UVcMLyLiceUm2s9jpL67ecUasxjr4rI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=bmhQgjSt; arc=none smtp.client-ip=95.215.58.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="bmhQgjSt" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770858872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8RYJyENWs1ZudeDBODTP1Tg5qAi1DxUPNeH2H4e0hzs=; b=bmhQgjStbRcKXE8muJK3tUf5EkPKUzkPuW80V9AExeNr+vSe/abmF68bZcaRk6WstBnM+7 3APjeC3SworF/FZi7LLiqVEQGkekmFtgVYgrLfoNJT7LsECH2CcKnpXpwMxD/86hde2qBt tIgd1JAAkkXiVC3MBcbOgvtDl2HpxWY= From: Ihor Solodrai To: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Eduard Zingerman Cc: Amery Hung , Mykyta Yatsenko , =?UTF-8?q?Alexis=20Lothor=C3=A9?= , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: [PATCH bpf-next v1 07/14] veristat: Fix a memory leak for preset ENUMERATOR Date: Wed, 11 Feb 2026 17:13:49 -0800 Message-ID: <20260212011356.3266753-8-ihor.solodrai@linux.dev> In-Reply-To: <20260212011356.3266753-1-ihor.solodrai@linux.dev> References: <20260212011356.3266753-1-ihor.solodrai@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" ASAN detected a memory leak in veristat. The cleanup code handling ENUMERATOR value missed freeing strdup-ed svalue. Fix it. Signed-off-by: Ihor Solodrai Acked-by: Mykyta Yatsenko --- tools/testing/selftests/bpf/veristat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/bpf/veristat.c b/tools/testing/selftes= ts/bpf/veristat.c index 1be1e353d40a..75f85e0362f5 100644 --- a/tools/testing/selftests/bpf/veristat.c +++ b/tools/testing/selftests/bpf/veristat.c @@ -3378,6 +3378,8 @@ int main(int argc, char **argv) } } free(env.presets[i].atoms); + if (env.presets[i].value.type =3D=3D ENUMERATOR) + free(env.presets[i].value.svalue); } free(env.presets); return -err; --=20 2.53.0