diff options
author | Sumit Bose <sbose@redhat.com> | 2012-11-19 11:20:31 +0100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-07-11 15:16:55 +1000 |
commit | d039f799ac426c903289800edc8febabe5bec49d (patch) | |
tree | 8bda0c1c7fe50b35390c226bcf18222d83ac913f /ctdb | |
parent | a40b9f2e7c188eeb3aa35039a1917adcbdde4a08 (diff) | |
download | samba-d039f799ac426c903289800edc8febabe5bec49d.tar.gz samba-d039f799ac426c903289800edc8febabe5bec49d.tar.xz samba-d039f799ac426c903289800edc8febabe5bec49d.zip |
Check return value of tdb_delete()
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 5cdcc3d45d358ddbcd7e864898eed9cbd9935429)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_recover.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c index 18b4d8e58e..0bec03e7a5 100644 --- a/ctdb/server/ctdb_recover.c +++ b/ctdb/server/ctdb_recover.c @@ -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")); } |