From patchwork Wed Nov 30 19:13:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1710652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nwl.cc header.i=@nwl.cc header.a=rsa-sha256 header.s=mail2022 header.b=I0bwTfnA; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4NMpm03YYpz23nT for ; Thu, 1 Dec 2022 06:14:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229569AbiK3TOG (ORCPT ); Wed, 30 Nov 2022 14:14:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiK3TOF (ORCPT ); Wed, 30 Nov 2022 14:14:05 -0500 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A5CE5E3E5 for ; Wed, 30 Nov 2022 11:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nwl.cc; s=mail2022; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bSExz4b7AR8//FttX5rRnDNgGAOn29sKnoYZSvwidwY=; b=I0bwTfnAS7tK0e0ekgW/DtYCpN CgQd1UJxYSqtQp5vLiS85GB0srbCXAj3OXGlaLixYY1SlNAFk0I9pq1Ef+BP3AYckUAKiezJ3HSFb RFwviexkpMFJzkgapbnUoi1BId7z0whejlNLJXN+XmTyR4cLuc02dkh+6LWeqhH5aVl6javjnL9wp DpWlV/LZW8UFHOd+V4d7S+a+XeKYm8XWbF7qaAy2a8fDUuLqOWcApcZuPZ73EDvhcor0hSDCKCLEE dhIra1gtRG6N/kmy73XbaxFnP8FTIYgIwZw9ec5Q2Sf5SfcOYkCjSj2wJFXLHa1TYSSQZfaO/b6kP XEZ/h1KA==; Received: from localhost ([::1] helo=xic) by orbyte.nwl.cc with esmtp (Exim 4.94.2) (envelope-from ) id 1p0SWx-00019z-Ko for netfilter-devel@vger.kernel.org; Wed, 30 Nov 2022 20:14:03 +0100 From: Phil Sutter To: netfilter-devel@vger.kernel.org Subject: [iptables PATCH 8/9] xshared: Free data after printing help Date: Wed, 30 Nov 2022 20:13:44 +0100 Message-Id: <20221130191345.14543-9-phil@nwl.cc> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221130191345.14543-1-phil@nwl.cc> References: <20221130191345.14543-1-phil@nwl.cc> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org This is merely to make valgrind happy, but less noise means less real issues missed. Signed-off-by: Phil Sutter --- iptables/xshared.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iptables/xshared.c b/iptables/xshared.c index 2a894c19a011d..f93529b11a319 100644 --- a/iptables/xshared.c +++ b/iptables/xshared.c @@ -1543,6 +1543,9 @@ void do_parse(int argc, char *argv[], XTF_TRY_LOAD, &cs->matches); xtables_printhelp(cs->matches); + xtables_clear_iptables_command_state(cs); + xtables_free_opts(1); + xtables_fini(); exit(0); /*