From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A136C4260C; Tue, 19 Sep 2023 16:58:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 019C840E25; Tue, 19 Sep 2023 16:58:16 +0200 (CEST) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 59C7540649 for ; Tue, 19 Sep 2023 16:58:14 +0200 (CEST) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-690bc3f8326so1190793b3a.0 for ; Tue, 19 Sep 2023 07:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1695135493; x=1695740293; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=okewhu0Seb/++WoWwQzwSVwsBHLCB1qyS5Cdd2wy8fk=; b=H6KDa/Gq6/2WJ+pZQOPRm2fhOGhoClL9v1IEPYuHMQX+dbgXFWpgXRZWf1fEQ8q5Af JfhUlsMttm/b0ykE+9NkO/4T3fIZZ/ccfu4QT+Dk0ErNiYbjYskwQQCmr1LCj+uturA+ e2RD6itSjrmxBIJPn55LbVpP2S2cGbeYvU/g9w2HdLORi6x9ZthENHBR1x8v9FG9hJEf HdAr2ah+CzRXCwFyXtOzqgZ/udj/rLiFbkO88/jH3WFv3C/ZvwLI4FWjkoZ7SoULRV6s lHFeFTf0j5EEElgKp2ry7QSM+34gBdpjmt84T0uPNH5y7Y2uA2CXUj6gfYP0UWVo4tgQ ZW4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695135493; x=1695740293; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=okewhu0Seb/++WoWwQzwSVwsBHLCB1qyS5Cdd2wy8fk=; b=Q7XNzenUJPo9TCv17ajLxybjOQ4D5R8JVYAWRS7EskOUxybLQSV7tqZi8akLePmraP YCRo5OhsuQ49JkFeBO9RtBhwyb4JXsX7+dAAaxKu03ATsa/fWuun93dH6dk72qjSczab dBI/6BUGWzkeDyE6cDu97Rao4TbvTU1OwrynPKNgzldMMVKUYChTg1k7L4jnHqIzQLFD yp1hwdsiofGgHuSoGfqOAK8jMnDOIdU21axaWunIzLi3hSZGe29WLT+JDED1biDiGdyd 11mwPKTU+Hlp9TX3hyRRGIfr1AtoTyBKyR4JqIEejd1pSTyN6sCDaYuDpmd9bQKy4xAt S9pQ== X-Gm-Message-State: AOJu0YyZ2HCl8CulJ2XGALz0WjFrb7aQk0Bi0vuTSXTMaxSVx1W1MJRd eyfEBVQ+DItRhONSvQi7N6S40g== X-Google-Smtp-Source: AGHT+IEv6TAKh/c/zGjQ4KfJns8XHeSfKM0zEIfU/MQdcinwYuYesRTkPlgevuL7dsDPdtEDcfLWUA== X-Received: by 2002:a05:6a20:1608:b0:15a:540b:bd66 with SMTP id l8-20020a056a20160800b0015a540bbd66mr11171378pzj.44.1695135493406; Tue, 19 Sep 2023 07:58:13 -0700 (PDT) Received: from hermes.local (204-195-112-131.wavecable.com. [204.195.112.131]) by smtp.gmail.com with ESMTPSA id y13-20020aa7854d000000b0068fcc7f6b00sm1072832pfn.74.2023.09.19.07.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 07:58:13 -0700 (PDT) Date: Tue, 19 Sep 2023 07:58:11 -0700 From: Stephen Hemminger To: Akhil Goyal Cc: , , Subject: Re: [PATCH] test/security: fix buffer leaks in error path Message-ID: <20230919075811.0f70b113@hermes.local> In-Reply-To: <20230822173316.465078-1-gakhil@marvell.com> References: <20230822173316.465078-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, 22 Aug 2023 23:03:16 +0530 Akhil Goyal wrote: > diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c > index 20670fe5d2..8b57bc51fb 100644 > --- a/app/test/test_security_inline_macsec.c > +++ b/app/test/test_security_inline_macsec.c > @@ -837,6 +837,11 @@ test_macsec_event_callback(uint16_t port_id, enum rte_eth_event_type type, > return 0; > } > > +#define FREE_PKTS(j, m) { \ > + while (j--) \ > + rte_pktmbuf_free(m[j]); \ > +} > + This is just a slower version of rte_pktmbuf_free_bulk!