OSDN Git Service

netfilter: ipset: add a coding-style fix to ip_set_ext_destroy.
authorJeremy Sowden <jeremy@azazel.net>
Thu, 3 Oct 2019 19:56:01 +0000 (20:56 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 7 Oct 2019 21:57:30 +0000 (23:57 +0200)
Use a local variable to hold comment in order to align the arguments of
ip_set_comment_free properly.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Acked-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/ipset/ip_set.h

index 9bc255a..9fee483 100644 (file)
@@ -269,9 +269,11 @@ ip_set_ext_destroy(struct ip_set *set, void *data)
        /* Check that the extension is enabled for the set and
         * call it's destroy function for its extension part in data.
         */
-       if (SET_WITH_COMMENT(set))
-               ip_set_extensions[IPSET_EXT_ID_COMMENT].destroy(
-                       set, ext_comment(data, set));
+       if (SET_WITH_COMMENT(set)) {
+               struct ip_set_comment *c = ext_comment(data, set);
+
+               ip_set_extensions[IPSET_EXT_ID_COMMENT].destroy(set, c);
+       }
 }
 
 static inline int