mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
Check return value of tdb_delete()
Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 5cdcc3d45d358ddbcd7e864898eed9cbd9935429)
This commit is contained in:
parent
a40b9f2e7c
commit
d039f799ac
@ -824,7 +824,9 @@ static int delete_tdb_record(struct ctdb_context *ctdb, struct ctdb_db_context *
|
||||
|
||||
if (data.dsize < sizeof(struct ctdb_ltdb_header)) {
|
||||
if (tdb_lock_nonblock(ctdb_db->ltdb->tdb, -1, F_WRLCK) == 0) {
|
||||
tdb_delete(ctdb_db->ltdb->tdb, key);
|
||||
if (tdb_delete(ctdb_db->ltdb->tdb, key) != 0) {
|
||||
DEBUG(DEBUG_CRIT,(__location__ " Failed to delete corrupt record\n"));
|
||||
}
|
||||
tdb_unlock(ctdb_db->ltdb->tdb, -1, F_WRLCK);
|
||||
DEBUG(DEBUG_CRIT,(__location__ " Deleted corrupt record\n"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user