]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_condition: simplify clean-up of variables
authorJeremy Sowden <jeremy@azazel.net>
Sun, 22 Aug 2021 16:35:56 +0000 (17:35 +0100)
committerJan Engelhardt <jengelh@inai.de>
Sun, 22 Aug 2021 19:39:36 +0000 (21:39 +0200)
Unlocking early and returning in the if-block just complicate the code
to no material benefit.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
extensions/xt_condition.c

index 0b0508b7723c9e2fc0c307e626707e049c33e24d..cf07966e71b7767333de68c3002c0dd20121cac4 100644 (file)
@@ -193,9 +193,7 @@ static void condition_mt_destroy(const struct xt_mtdtor_param *par)
                list_del(&var->list);
                if (cnet->proc_net_condition)
                        remove_proc_entry(var->name, cnet->proc_net_condition);
-               mutex_unlock(&cnet->proc_lock);
                kfree(var);
-               return;
        }
        mutex_unlock(&cnet->proc_lock);
 }