summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2016-08-12 01:33:38 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-12 01:56:50 +0200
commit7a150cacc1754f66525f0e87b14b35fbc2a6338e (patch)
tree68934580a1708a135b497e1e592692aff5e38479 /src/rule.c
parentd26feca2c9c19b650b5a7554b5a412ceca990b7a (diff)
src: Avoid returning uninitialized data
Although the 'err' pointer should be interesting for users only if the parser returned non-zero, having it point to uninitialized data is generally a bad thing. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rule.c b/src/rule.c
index dada00e..8aeefbe 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -700,7 +700,7 @@ static int nftnl_rule_do_parse(struct nftnl_rule *r, enum nftnl_parse_type type,
enum nftnl_parse_input input)
{
int ret;
- struct nftnl_parse_err perr;
+ struct nftnl_parse_err perr = {};
switch (type) {
case NFTNL_PARSE_XML: