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_iprange.c | |
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_iprange.c')
-rw-r--r-- | extensions/libxt_iprange.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/extensions/libxt_iprange.c b/extensions/libxt_iprange.c index 8be24814..04ce7b36 100644 --- a/extensions/libxt_iprange.c +++ b/extensions/libxt_iprange.c @@ -73,11 +73,9 @@ iprange_parse_spec(const char *from, const char *to, union nf_inet_addr *range, static void iprange_parse_range(const char *oarg, union nf_inet_addr *range, uint8_t family, const char *optname) { - char *arg = strdup(oarg); + char *arg = xtables_strdup(oarg); char *dash; - if (arg == NULL) - xtables_error(RESOURCE_PROBLEM, "strdup"); dash = strchr(arg, '-'); if (dash == NULL) { iprange_parse_spec(arg, arg, range, family, optname); |