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 0E912A0C42; Wed, 23 Jun 2021 19:07:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEC274003F; Wed, 23 Jun 2021 19:07:11 +0200 (CEST) Received: from mail-ua1-f97.google.com (mail-ua1-f97.google.com [209.85.222.97]) by mails.dpdk.org (Postfix) with ESMTP id C1ABE4003E for ; Wed, 23 Jun 2021 19:07:10 +0200 (CEST) Received: by mail-ua1-f97.google.com with SMTP id c20so1125237uar.12 for ; Wed, 23 Jun 2021 10:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qn+Js4qLLbSj7z8q4i0Xesf+H/4V7dBLkxlNEMFSJUU=; b=RfIAr/hj6BfmxPpc1dxRaIjLBUn3gZLxPSL1285frAi6XL2GD/DQ5Ha1MLqtP6rlCQ PXjk3G//jQNHqwnvdh/uL/djVO/NfmEjxUnpKA5MSTkGtnL/tVCr7xosJFL3BZJtuAqg yLOqHe4KB42qRdQquFkg2G9x7qWQBzZvmaTck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qn+Js4qLLbSj7z8q4i0Xesf+H/4V7dBLkxlNEMFSJUU=; b=Nyob/bX8ydq9nL4UVktr3y4wb3hMBoTQ47ldlizzckAEVK9P8YTR/8+zAsq6wh5AsR sZFnjIIDopIea7DBqq551b40gDiK5WuA5w0F2aPcffCrM1HzqfHMMFFjr8fgx6GJ5pek bupz0ZePXx57yOTMn/XgWgm0UzlcDjUnLUyOpwpsahCu63Ugzc+/PHLhnfgTefjYLess OCv6b811XD+bGj3kBKmLcJxbaJpO9buz0UD7x7v67mg9FWoKZ06rmU+uaKfatzNfLiRG THX7P7ejb+dLGWdC+cT9ZO0rTQTLdAMG2opGiZao/0XdoPH7I9IBe00937udTgM0vRCf pG5A== X-Gm-Message-State: AOAM530hxO6MNyua3MgDMc1i9TjHU9raE5m5kY9eR8p4S1oiODdZ2u0w MbtLO6g69+d5tUELk4vuDeD+ZajfWzpVdDMtvKt0gTMRRTZP8Qmr9LKSXY6JxSrHkCadagNvZLs jFjd6np6jLeYFxUntYF/mamBsxK1dz3FQafQ92D6tRqsNZSu7Vu44/mpIpQ6FoMc8cD1dCoG6Zw == X-Google-Smtp-Source: ABdhPJz6j5p/0iDTq5I1rYe7lJf9bIs3pZTjWWsVQaF39py0N0oDonYK1uck9gAO/kgsTqtHJEwrSkYdgpN7 X-Received: by 2002:a9f:2c90:: with SMTP id w16mr1195746uaj.135.1624468030249; Wed, 23 Jun 2021 10:07:10 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id d66sm222274vkg.0.2021.06.23.10.07.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jun 2021 10:07:10 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1220:47d3:d45d:6a1c:8da0]) by postal.iol.unh.edu (Postfix) with ESMTP id C7A986052490; Wed, 23 Jun 2021 13:07:09 -0400 (EDT) From: ohilyard@iol.unh.edu To: bernard.iremonger@intel.com Cc: dev@dpdk.org, david.marchand@redhat.com, Owen Hilyard Date: Wed, 23 Jun 2021 13:07:07 -0400 Message-Id: <20210623170708.43755-1-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210616195724.366103-1-ohilyard@iol.unh.edu> References: <20210616195724.366103-1-ohilyard@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] flow_classify: fix leaking rules on delete 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 Sender: "dev" From: Owen Hilyard Rules in a classify table were not freed if the table had a delete function. Fixes: be41ac2a3 ("flow_classify: introduce flow classify library") Signed-off-by: Owen Hilyard --- lib/flow_classify/rte_flow_classify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/flow_classify/rte_flow_classify.c b/lib/flow_classify/rte_flow_classify.c index f125267e8..d3ba2ed22 100644 --- a/lib/flow_classify/rte_flow_classify.c +++ b/lib/flow_classify/rte_flow_classify.c @@ -579,12 +579,12 @@ rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls, &rule->u.key.key_del, &rule->key_found, &rule->entry); - + if (ret == 0) + free(rule); return ret; } } } - free(rule); return ret; } -- 2.30.2