Commit ffd73d41 authored by Andreas Schmidt's avatar Andreas Schmidt

Fix double unlock.

* Log pthread_mutex_destroy result. 
parent 4bbb2e8d
Pipeline #2672 passed with stages
in 1 minute and 27 seconds
......@@ -34,7 +34,8 @@ PrrtChannelStateInformation * PrrtChannelStateInformation_create()
bool PrrtChannelStateInformation_destroy(PrrtChannelStateInformation *csi)
{
check(pthread_mutex_destroy(&csi->lock) == EXIT_SUCCESS, "Destroy mutex failed.");
int destroyResult = pthread_mutex_destroy(&csi->lock);
check(destroyResult == EXIT_SUCCESS, "Destroy mutex failed: %d.", destroyResult);
free(csi);
return true;
error:
......@@ -82,7 +83,6 @@ prrtTimedelta_t PrrtChannelStateInformation_get_rtprop(PrrtChannelStateInformati
{
check(pthread_mutex_lock(&csi->lock) == EXIT_SUCCESS, "Lock failed.");
prrtAtomicTimedelta_t res = csi->rtprop;
pthread_mutex_unlock(&csi->lock);
check(pthread_mutex_unlock(&csi->lock) == EXIT_SUCCESS, "Unlock failed.");
return (prrtTimedelta_t) res;
error:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment