Commit ffd73d41 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Fix double unlock.

* Log pthread_mutex_destroy result. 
parent 4bbb2e8d
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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: