[PATCH 2/3] dtype: fix memory leak in concat_type_destroy()

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

 



Free allocated memory for ->desc.

Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
---
 src/datatype.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/datatype.c b/src/datatype.c
index db3fb06..5599c59 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -950,6 +950,8 @@ const struct datatype *concat_type_alloc(const struct expr *expr)
 
 void concat_type_destroy(const struct datatype *dtype)
 {
-	if (dtype->flags & DTYPE_F_ALLOC)
+	if (dtype->flags & DTYPE_F_ALLOC) {
+		xfree(dtype->desc);
 		xfree(dtype);
+	}
 }
-- 
2.1.0

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