When we return with an error we cannot unlock the mutex, because
it's been freed. Protect against that, hopefully unlikely, case. Reviewed by: rpaulo MFC after: 2 weeks
This commit is contained in:
parent
f5705b527d
commit
26d121f5df
@ -942,7 +942,8 @@ dt_proc_create_thread(dtrace_hdl_t *dtp, dt_proc_t *dpr, uint_t stop)
|
||||
(int)dpr->dpr_pid, strerror(err));
|
||||
}
|
||||
|
||||
(void) pthread_mutex_unlock(&dpr->dpr_lock);
|
||||
if (err == 0)
|
||||
(void) pthread_mutex_unlock(&dpr->dpr_lock);
|
||||
(void) pthread_attr_destroy(&a);
|
||||
|
||||
return (err);
|
||||
|
Loading…
x
Reference in New Issue
Block a user