1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

Check for null tdb context in tdb_exists()

(This used to be commit bbacdb834f9c8f8c34368664def42dabe78d90c9)
This commit is contained in:
Tim Potter 2000-03-01 01:10:25 +00:00
parent 4fb014372e
commit 9fd3d3963e

View File

@ -703,6 +703,13 @@ int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key)
tdb_off rec_ptr;
struct list_struct rec;
if (tdb == NULL) {
#ifdef TDB_DEBUG
printf("tdb_exists() called with null context\n");
#endif
return 0;
}
/* find which hash bucket it is in */
hash = tdb_hash(&key);