]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
xlate: Fix for fd leak in error path
authorPhil Sutter <phil@nwl.cc>
Wed, 22 Feb 2023 16:30:20 +0000 (17:30 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 10 Mar 2023 12:16:51 +0000 (13:16 +0100)
A rather cosmetic issue though, the program will terminate anyway.

Fixes: 325af556cd3a6 ("add ipset to nftables translation infrastructure")
Signed-off-by: Phil Sutter <phil@nwl.cc>
lib/ipset.c

index f57b07413cba505676eb6879f2404933047da3d9..2e098e435d954d44beac0f86e55ff52b93146e4f 100644 (file)
@@ -1999,7 +1999,7 @@ static int ipset_xlate_restore(struct ipset *ipset)
 
                ret = build_argv(ipset, c);
                if (ret < 0)
-                       return ret;
+                       break;
 
                cmd = ipset_parser(ipset, ipset->newargc, ipset->newargv);
                if (cmd < 0)