From 9fd3d3963e79c8671549af95490efebe6b76b1d7 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 1 Mar 2000 01:10:25 +0000 Subject: Check for null tdb context in tdb_exists() (This used to be commit bbacdb834f9c8f8c34368664def42dabe78d90c9) --- source3/tdb/tdb.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/tdb/tdb.c') 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); -- cgit