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 /iptables/iptables-xml.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 'iptables/iptables-xml.c')
-rw-r--r-- | iptables/iptables-xml.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/iptables-xml.c b/iptables/iptables-xml.c index 98d03dda..6cf059fb 100644 --- a/iptables/iptables-xml.c +++ b/iptables/iptables-xml.c @@ -213,8 +213,8 @@ saveChain(char *chain, char *policy, struct xt_counters *ctr) "%s: line %u chain name invalid\n", prog_name, line); - chains[nextChain].chain = strdup(chain); - chains[nextChain].policy = strdup(policy); + chains[nextChain].chain = xtables_strdup(chain); + chains[nextChain].policy = xtables_strdup(policy); chains[nextChain].count = *ctr; chains[nextChain].created = 0; nextChain++; |