net: Add NULL check to eventhandler
The eventhandler gets called with NULL buf, but it can't handle it. Add a NULL check to prevent crashing. Change-Id: Id16c2aa093a145e0442dfc61dd0b6e1b81b701f5 Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
This commit is contained in:
parent
079ba81fd1
commit
a8cd2ff368
1 changed files with 2 additions and 0 deletions
|
@ -420,6 +420,8 @@ eventhandler(process_event_t ev, process_data_t data, struct net_buf *buf)
|
||||||
case PROCESS_EVENT_TIMER:
|
case PROCESS_EVENT_TIMER:
|
||||||
/* We get this event if one of our timers have expired. */
|
/* We get this event if one of our timers have expired. */
|
||||||
{
|
{
|
||||||
|
if(!buf)
|
||||||
|
break;
|
||||||
/* Check the clock so see if we should call the periodic uIP
|
/* Check the clock so see if we should call the periodic uIP
|
||||||
processing. */
|
processing. */
|
||||||
if(data == &periodic &&
|
if(data == &periodic &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue