File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
components/uic_contiki/core/sys Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,7 @@ static void do_event(void) CC_REENTRANT_ARG
313
313
314
314
data = events [fevent ].data ;
315
315
receiver = events [fevent ].p ;
316
+ int fevent_copy = fevent ; /* To be cleared once processed */
316
317
317
318
/* Since we have seen the new event, we move pointer upwards
318
319
and decrese the number of events. */
@@ -342,6 +343,9 @@ static void do_event(void) CC_REENTRANT_ARG
342
343
/* Make sure that the process actually is running. */
343
344
call_process (receiver , ev , data );
344
345
}
346
+ /* Clear pointer (to potentially unreachable/freed data) */
347
+ events [fevent_copy ].data = NULL ;
348
+ events [fevent_copy ].p = NULL ;
345
349
}
346
350
}
347
351
/*---------------------------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments