mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
plug unlikely memleak (coverity)
This commit is contained in:
parent
74d89e567c
commit
14a3efa48a
@ -195,6 +195,8 @@ bdb_db_cache(
|
||||
"bdb_db_cache: db_open(%s) failed: %s (%d)\n",
|
||||
name->bv_val, db_strerror(rc), rc );
|
||||
ldap_pvt_thread_mutex_unlock( &bdb->bi_database_mutex );
|
||||
db->bdi_db->close( db->bdi_db, 0 );
|
||||
ch_free( db );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -406,6 +406,7 @@ shm_retry:
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
LDAP_XSTRING(bdb_db_open) ": %s\n",
|
||||
cr->msg, 0, 0 );
|
||||
ch_free( db );
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -419,6 +420,8 @@ shm_retry:
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
LDAP_XSTRING(bdb_db_open) ": %s\n",
|
||||
cr->msg, 0, 0 );
|
||||
db->bdi_db->close( db->bdi_db, 0 );
|
||||
ch_free( db );
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
@ -433,6 +436,8 @@ shm_retry:
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
LDAP_XSTRING(bdb_db_open) ": %s\n",
|
||||
cr->msg, 0, 0 );
|
||||
db->bdi_db->close( db->bdi_db, 0 );
|
||||
ch_free( db );
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
@ -504,6 +509,7 @@ shm_retry:
|
||||
LDAP_XSTRING(bdb_db_open) ": %s\n",
|
||||
cr->msg, 0, 0 );
|
||||
db->bdi_db->close( db->bdi_db, 0 );
|
||||
ch_free( db );
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user