Merge pull request #657 from atiselsts/networking_patches

Phase RDC memory allocation bugfix
This commit is contained in:
Nicolas Tsiftes 2015-09-24 16:50:00 +02:00
commit a536801e24

View File

@ -219,6 +219,11 @@ phase_wait(const linkaddr_t *neighbor, rtimer_clock_t cycle_time,
if(buf_list == NULL) {
packetbuf_set_attr(PACKETBUF_ATTR_IS_CREATED_AND_SECURED, 1);
p->q = queuebuf_new_from_packetbuf();
if(p->q == NULL) {
/* memory allocation failed */
memb_free(&queued_packets_memb, p);
return PHASE_UNKNOWN;
}
}
p->mac_callback = mac_callback;
p->mac_callback_ptr = mac_callback_ptr;