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:
Jaakko Hannikainen 2016-08-12 15:26:36 +03:00
commit a8cd2ff368

View file

@ -420,6 +420,8 @@ eventhandler(process_event_t ev, process_data_t data, struct net_buf *buf)
case PROCESS_EVENT_TIMER:
/* 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
processing. */
if(data == &periodic &&