diff options
Diffstat (limited to 'src/nlmsg.c')
-rw-r--r-- | src/nlmsg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nlmsg.c b/src/nlmsg.c index cb2cbb8..000829e 100644 --- a/src/nlmsg.c +++ b/src/nlmsg.c @@ -105,8 +105,9 @@ void * mnl_nlmsg_put_extra_header(struct nlmsghdr *nlh, size_t size) { char *ptr = (char *)nlh + nlh->nlmsg_len; - nlh->nlmsg_len += MNL_ALIGN(size); - memset(ptr, 0, size); + size_t len = MNL_ALIGN(size); + nlh->nlmsg_len += len; + memset(ptr, 0, len); return ptr; } EXPORT_SYMBOL(mnl_nlmsg_put_extra_header); |