Skip to contentSkip to conversation

set_elem: use proper free function

PATCH New Arturo Borrero Gonzalez 1 participant 1 message Jul 3, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 set_elem: use proper free function

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

---
 src/set_elem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/set_elem.c +1 -1
index 3b27317..9e3c55f 100644
@@ -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;
 	}