From 2a2ce7a2d0def1873c795217ebed0d064aa9ef42 Mon Sep 17 00:00:00 2001 From: Zakir Durumeric Date: Mon, 19 Aug 2013 11:34:16 -0400 Subject: [PATCH] fixing get_gateway malloc error issue #21 --- src/get_gateway.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/get_gateway.c b/src/get_gateway.c index 26f6404..25eca38 100644 --- a/src/get_gateway.c +++ b/src/get_gateway.c @@ -72,7 +72,7 @@ int send_nl_req(uint16_t msg_type, uint32_t seq, return -1; } - memset(nlmsg, 0, sizeof(nlmsg)); + memset(nlmsg, 0, sizeof(struct nlmsghdr)); memcpy(NLMSG_DATA(nlmsg), payload, payload_len); nlmsg->nlmsg_type = msg_type; nlmsg->nlmsg_len = NLMSG_LENGTH(payload_len);