This commit is contained in:
Anubhav Rawal 2026-05-06 16:27:49 -07:00 committed by GitHub
commit 24ae61c503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3541,6 +3541,15 @@
pxParams->xOptionalValue, pxParams->xOptionalValue,
pxParams->pxHigherPriorityTaskWoken, pxParams->pxHigherPriorityTaskWoken,
pxParams->xTicksToWait ); pxParams->xTicksToWait );
/* Timer deletion is asynchronous - eagerly invalidate the
* object pool entry only if the delete command was successfully
* queued, to prevent stale handle access after the timer daemon
* frees the Timer_t. */
if( ( xReturn == pdPASS ) && ( pxParams->xCommandID == tmrCOMMAND_DELETE ) )
{
MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
}
} }
} }
} }