diff options
Diffstat (limited to 'rpmdb/db3.c')
-rw-r--r-- | rpmdb/db3.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rpmdb/db3.c b/rpmdb/db3.c index abe61daf5..d142ef250 100644 --- a/rpmdb/db3.c +++ b/rpmdb/db3.c @@ -241,9 +241,9 @@ static int db3_pthread_nptl(void) ret = pthread_mutex_init(&mutex, mutexattrp); if (mutexattrp != NULL) pthread_mutexattr_destroy(mutexattrp); - (void) pthread_mutex_destroy(&mutex); if (ret) return ret; + (void) pthread_mutex_destroy(&mutex); ret = pthread_condattr_init(&condattr); if (ret == 0) { @@ -256,7 +256,8 @@ static int db3_pthread_nptl(void) if (condattrp != NULL) (void)pthread_condattr_destroy(condattrp); - (void) pthread_cond_destroy(&cond); + if (ret == 0) + (void) pthread_cond_destroy(&cond); return ret; } #endif |