Use a local variable to hold comment in order to align the arguments of ip_set_comment_free properly.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -269,9 +269,11 @@ ip_set_ext_destroy(struct ip_set *set, void *data) · 268 unmodified lines | ||
| 269 | 269 | /* Check that the extension is enabled for the set and |
| 270 | 270 | * call it's destroy function for its extension part in data. |
| 271 | 271 | */ |
| 272 | − if (SET_WITH_COMMENT(set)) | |
| 273 | − ip_set_extensions[IPSET_EXT_ID_COMMENT].destroy( | |
| 274 | − set, ext_comment(data, set)); | |
| 272 | + if (SET_WITH_COMMENT(set)) { | |
| 273 | + struct ip_set_comment *c = ext_comment(data, set); | |
| 274 | + | |
| 275 | + ip_set_extensions[IPSET_EXT_ID_COMMENT].destroy(set, c); | |
| 276 | + } | |
| 275 | 277 | } |
| 276 | 278 | |
| 277 | 279 | static inline int |