[libnftnl PATCH] set_elem: use proper free function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let's use the proper free function to liberate the set_elem,
so we avoid potential memory leaks.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx>
---
 src/set_elem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
 

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux