summaryrefslogtreecommitdiff
path: root/source3/tdb/tdb.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-03-01 01:10:25 +0000
committerTim Potter <tpot@samba.org>2000-03-01 01:10:25 +0000
commit9fd3d3963e79c8671549af95490efebe6b76b1d7 (patch)
tree6b8b796d4710dbf21f4a697a011244b89f9ad487 /source3/tdb/tdb.c
parent4fb014372e7bcf1b40396841f162a14cb58a086a (diff)
downloadsamba-9fd3d3963e79c8671549af95490efebe6b76b1d7.tar.gz
samba-9fd3d3963e79c8671549af95490efebe6b76b1d7.tar.bz2
samba-9fd3d3963e79c8671549af95490efebe6b76b1d7.zip
Check for null tdb context in tdb_exists()
(This used to be commit bbacdb834f9c8f8c34368664def42dabe78d90c9)
Diffstat (limited to 'source3/tdb/tdb.c')
-rw-r--r--source3/tdb/tdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index c7b70aa153..388f4f419f 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -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);