From nobody Thu Apr 2 18:59:41 2026 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 E433236AB5C for ; Mon, 23 Feb 2026 19:08:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771873717; cv=none; b=rGvs4qGURzM+FSVYD4cs0OmDOlUhINXUoBgXHyVqkN/rcGIH+00e0xDoeNvhkoJCc8d3GH1N1QJLU+nbzfjloCVcPPZMAjN9lCVZZY549dupIuv7ui9qm8c579rTmrE6vn5Q2V/Zcsvr9Y29nRBqh4XY6SAprhJmwuVdKModro4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771873717; c=relaxed/simple; bh=kwrsgq8rd0jKppaiL7WPQlFKokPcRkuuqua0r2Z1GHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MB5GTgYB4KHzaK7nHlaKetA5DJfOMALnMk2OeIGBp82Wn4ACUjA/WqLuzn9DPmbwyaj71HPgh726EaLvc5BG+JSX2diisWPHBhLKzjK47eDgVhz6BhQNVCPunOA9GtoHtbHNs21It5NubyeH3/X0Pm9qre9TSdTSNIgT4d8ETws= 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=OoKm2B6w; arc=none smtp.client-ip=91.218.175.182 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="OoKm2B6w" 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=1771873712; 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=YxHDHTJszBQ9UY5j/vo3lm9Z9CQCJiWhYDvWpF8HC5A=; b=OoKm2B6w79YWaV6FgBGp7vdqdA0Wsgfo7c56tWQ7qUkCgeLsh7oIhnVGstR/mXSvcsIjAA Mpk62eAqUvWKMkNr9BCE69cDjKvbz0BNpr9SOmPUTxrB3RpAuvWuPhJtAPWk0yWr/nlLAI mk1wtgWmy8MetwG56IOhW2GA0GTrzl8= From: Ihor Solodrai To: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Eduard Zingerman , Jiri Olsa , Mykyta Yatsenko , =?UTF-8?q?Alexis=20Lothor=C3=A9?= Cc: Amery Hung , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: [PATCH bpf v4 12/20] veristat: Fix a memory leak for preset ENUMERATOR Date: Mon, 23 Feb 2026 11:07:28 -0800 Message-ID: <20260223190736.649171-13-ihor.solodrai@linux.dev> In-Reply-To: <20260223190736.649171-1-ihor.solodrai@linux.dev> References: <20260223190736.649171-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. Acked-by: Mykyta Yatsenko Signed-off-by: Ihor Solodrai --- 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