From patchwork Thu Jul 3 16:04:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arturo Borrero X-Patchwork-Id: 366927 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1C63314001A for ; Fri, 4 Jul 2014 02:04:35 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757960AbaGCQEe (ORCPT ); Thu, 3 Jul 2014 12:04:34 -0400 Received: from smtp3.cica.es ([150.214.5.190]:49823 "EHLO smtp.cica.es" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756403AbaGCQEd (ORCPT ); Thu, 3 Jul 2014 12:04:33 -0400 Received: from localhost (unknown [127.0.0.1]) by smtp.cica.es (Postfix) with ESMTP id 2EA7B51EDAF; Thu, 3 Jul 2014 16:04:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at cica.es Received: from smtp.cica.es ([127.0.0.1]) by localhost (mail.cica.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2VUfBTY-9T1R; Thu, 3 Jul 2014 18:04:23 +0200 (CEST) Received: from nfdev.cica.es (nfdev.cica.es [150.214.8.220]) by smtp.cica.es (Postfix) with ESMTP id D9EE551EDA7; Thu, 3 Jul 2014 18:04:23 +0200 (CEST) Subject: [libnftnl PATCH] set_elem: use proper free function To: netfilter-devel@vger.kernel.org From: Arturo Borrero Gonzalez Cc: pablo@netfilter.org Date: Thu, 03 Jul 2014 18:04:21 +0200 Message-ID: <20140703160421.13770.955.stgit@nfdev.cica.es> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Let's use the proper free function to liberate the set_elem, so we avoid potential memory leaks. Signed-off-by: Arturo Borrero Gonzalez --- src/set_elem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/set_elem.c b/src/set_elem.c index 3b27317..9e3c55f 100644 --- a/src/set_elem.c +++ b/src/set_elem.c @@ -290,7 +290,7 @@ static int nft_set_elems_parse2(struct nft_set *s, const struct nlattr *nest) } } if (ret < 0) { - xfree(e); + nft_set_elem_free(e); return -1; }