trafficserver
trafficserver copied to clipboard
Fix potential mutex destroy while locked in origin_server_auth plugin
It's possible depending on refcounts of underlying mutex objects that when tearing down an instance of the origin_server_auth plugin that we might call pthread_mutex_destroy while holding a lock on the same mutex. This causes ATS to abort.
The fix involves deferring the continuation destroy until after the mutex is unlocked. At that time, it doesn't matter what the refcount is and it is safe to destroy the mutex.