net: Initialize Contiki vars related to L2 buffer mgmt

The l2_buf struct contains variables that Contiki uses
for it's state management. It is important that we
initialize these variables into sane values otherwise
there will be hard to catch errors like overwriting
memory in other parts of the system.

Change-Id: Id0f552a6f0f2858fc6e8e4964ada0715a40f46f8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2016-02-05 16:23:57 +02:00 committed by Anas Nashif
commit cd14f65ebe

View file

@ -125,6 +125,8 @@ struct net_buf *l2_buf_get_reserve(uint16_t reserve_head)
NET_DBG("buf %p reserve %u ref %d\n", buf, reserve_head, buf->ref); NET_DBG("buf %p reserve %u ref %d\n", buf, reserve_head, buf->ref);
#endif #endif
packetbuf_clear(buf);
return buf; return buf;
} }