tests/ieee802154: Fix a null pointer deferencing

Jira: ZEP-2331

Reported-by Andrew Boie <andrew.p.boie@intel.com>

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2017-07-07 10:43:08 +02:00 committed by Jukka Rissanen
commit b07f20c143

View file

@ -63,6 +63,10 @@ static int fake_set_txpower(struct device *dev, s16_t dbm)
static inline void insert_frag_dummy_way(struct net_pkt *pkt)
{
if (!current_pkt) {
return;
}
if (current_pkt->frags) {
struct net_buf *frag, *prev_frag = NULL;