summaryrefslogtreecommitdiff
path: root/rpmdb/db3.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-02-03 11:46:52 +0000
committerjbj <devnull@localhost>2003-02-03 11:46:52 +0000
commit3b6005fbd9eb3d071674343db8defe3c3aabc74a (patch)
treea987a01ff319b031ab96dcbd6b7611054003e5ae /rpmdb/db3.c
parent8b68faf981d02d50d1666f543c337bb72cd23def (diff)
downloadrpm-3b6005fbd9eb3d071674343db8defe3c3aabc74a.tar.gz
rpm-3b6005fbd9eb3d071674343db8defe3c3aabc74a.tar.bz2
rpm-3b6005fbd9eb3d071674343db8defe3c3aabc74a.zip
oops, get rid of debugging printf's.
destroy nptl functional test mutex/cond iff successful. initialize getcwd buffer to zero to keep valgrind happy. CVS patchset: 6035 CVS date: 2003/02/03 11:46:52
Diffstat (limited to 'rpmdb/db3.c')
-rw-r--r--rpmdb/db3.c5
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