]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
missing mutex unlock fix from rel eng 1.1
authorKurt Zeilenga <kurt@openldap.org>
Sat, 5 Dec 1998 02:43:01 +0000 (02:43 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 5 Dec 1998 02:43:01 +0000 (02:43 +0000)
servers/slurpd/replog.c
servers/slurpd/st.c

index c3a855cffecbc626a00d2c67b443c74213c40e73..0305e65ad2abf586353da418971e60599436eaf0 100644 (file)
@@ -131,7 +131,7 @@ copy_replog(
        Debug( LDAP_DEBUG_ANY,
                "Error: copy_replog: Can't lock replog \"%s\" for write: %s\n",
                src, sys_errlist[ errno ], 0 );
-       lock_fclose( rfp );
+       lock_fclose( rfp, lfp );
        return( 1 );
     }
 
@@ -147,12 +147,12 @@ copy_replog(
        truncate( src, (off_t) 0 );
     }
 
-    if ( lock_fclose( rfp, lfp ) == EOF ) {
+    if ( lock_fclose( dfp, dlfp ) == EOF ) {
        Debug( LDAP_DEBUG_ANY,
                "Error: copy_replog: Error closing \"%s\"\n",
                src, 0, 0 );
     }
-    if ( lock_fclose( dfp, dlfp ) == EOF ) {
+    if ( lock_fclose( rfp, lfp ) == EOF ) {
        Debug( LDAP_DEBUG_ANY,
                "Error: copy_replog: Error closing \"%s\"\n",
                src, 0, 0 );
index 610b29585342e2b4205d82ed080288b4448f2934..584d5e3728b34d9100cfe38f040a040ad3db26ef 100644 (file)
@@ -56,8 +56,7 @@ St_add(
        pthread_mutex_unlock( &(st->st_mutex ));
        return NULL;
     }
-    st->st_data[ ind ]  = ( Stel * ) ch_malloc( st->st_data,
-           sizeof( Stel ));
+    st->st_data[ ind ]  = ( Stel * ) ch_malloc( sizeof( Stel ) );
     if ( st->st_data[ ind ] == NULL ) {
        pthread_mutex_unlock( &(st->st_mutex ));
        return NULL;
@@ -186,6 +185,7 @@ St_read(
        return 0;
     }
     if (( rc = acquire_lock( sglob->slurpd_status_file, &fp, &lfp)) < 0 ) {
+       pthread_mutex_unlock( &(st->st_mutex ));
        return 0;
     }
     while ( fgets( buf, sizeof( buf ), fp ) != NULL ) {