We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8c9d35 commit 6301738Copy full SHA for 6301738
1 file changed
portable/Common/mpu_wrappers_v2.c
@@ -3541,6 +3541,15 @@
3541
pxParams->xOptionalValue,
3542
pxParams->pxHigherPriorityTaskWoken,
3543
pxParams->xTicksToWait );
3544
+
3545
+ /* Timer deletion is asynchronous - eagerly invalidate the
3546
+ * object pool entry only if the delete command was successfully
3547
+ * queued, to prevent stale handle access after the timer daemon
3548
+ * frees the Timer_t. */
3549
+ if( ( xReturn == pdPASS ) && ( pxParams->xCommandID == tmrCOMMAND_DELETE ) )
3550
+ {
3551
+ MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3552
+ }
3553
}
3554
3555
0 commit comments