diff options
Diffstat (limited to 'src/expect')
-rw-r--r-- | src/expect/api.c | 4 | ||||
-rw-r--r-- | src/expect/build.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/expect/api.c b/src/expect/api.c index 39cd092..b100c72 100644 --- a/src/expect/api.c +++ b/src/expect/api.c @@ -513,6 +513,8 @@ int nfexp_build_expect(struct nfnl_subsys_handle *ssh, assert(req != NULL); assert(exp != NULL); + memset(req, 0, size); + return __build_expect(ssh, req, size, type, flags, exp); } @@ -546,7 +548,7 @@ __build_query_exp(struct nfnl_subsys_handle *ssh, assert(data != NULL); assert(req != NULL); - memset(req, 0, size); + memset(buffer, 0, size); switch(qt) { case NFCT_Q_CREATE: diff --git a/src/expect/build.c b/src/expect/build.c index 2e0f968..1807adc 100644 --- a/src/expect/build.c +++ b/src/expect/build.c @@ -29,8 +29,6 @@ int __build_expect(struct nfnl_subsys_handle *ssh, else return -1; - memset(req, 0, size); - buf = (char *)&req->nlh; nlh = mnl_nlmsg_put_header(buf); nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK_EXP << 8) | type; |