]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
dtype: fix memory leak in concat_type_destroy()
authorPatrick McHardy <kaber@trash.net>
Sat, 13 Sep 2014 09:07:49 +0000 (10:07 +0100)
committerPatrick McHardy <kaber@trash.net>
Thu, 11 Dec 2014 22:09:12 +0000 (22:09 +0000)
Free allocated memory for ->desc.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/datatype.c

index db3fb06cd0d473f171d6ccb80c75ecd262060e2a..5599c597779eb129643adb7c9671468d820efc78 100644 (file)
@@ -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);
+       }
 }