diff options
author | Phil Sutter <phil@nwl.cc> | 2021-06-02 12:56:06 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-06-07 14:50:27 +0200 |
commit | 9b85e1ab3dbf0d9344562c5c76114496e3ebaa3a (patch) | |
tree | 297ae64c83a98f3b8c1e4ab0b739df1110cbe067 /extensions/libxt_set.h | |
parent | ca840c20b7b754d36a1abe7e597fd730dea142d4 (diff) |
libxtables: Introduce xtables_strdup() and use it everywhere
This wraps strdup(), checking for errors.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libxt_set.h')
-rw-r--r-- | extensions/libxt_set.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/libxt_set.h b/extensions/libxt_set.h index 41dfbd30..ad895a75 100644 --- a/extensions/libxt_set.h +++ b/extensions/libxt_set.h @@ -141,7 +141,7 @@ get_set_byname(const char *setname, struct xt_set_info *info) static void parse_dirs_v0(const char *opt_arg, struct xt_set_info_v0 *info) { - char *saved = strdup(opt_arg); + char *saved = xtables_strdup(opt_arg); char *ptr, *tmp = saved; int i = 0; @@ -167,7 +167,7 @@ parse_dirs_v0(const char *opt_arg, struct xt_set_info_v0 *info) static void parse_dirs(const char *opt_arg, struct xt_set_info *info) { - char *saved = strdup(opt_arg); + char *saved = xtables_strdup(opt_arg); char *ptr, *tmp = saved; while (info->dim < IPSET_DIM_MAX && tmp != NULL) { |