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
313313
314314 data = events [fevent ].data ;
315315 receiver = events [fevent ].p ;
316+ int fevent_copy = fevent ; /* To be cleared once processed */
316317
317318 /* Since we have seen the new event, we move pointer upwards
318319 and decrese the number of events. */
@@ -342,6 +343,9 @@ static void do_event(void) CC_REENTRANT_ARG
342343 /* Make sure that the process actually is running. */
343344 call_process (receiver , ev , data );
344345 }
346+ /* Clear pointer (to potentially unreachable/freed data) */
347+ events [fevent_copy ].data = NULL ;
348+ events [fevent_copy ].p = NULL ;
345349 }
346350}
347351/*---------------------------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments