diff options
author | Tim Potter <tpot@samba.org> | 2000-03-01 01:11:09 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-03-01 01:11:09 +0000 |
commit | 6aebc19a887ba43961b04f0c7b93df7210e0918c (patch) | |
tree | 58e753dfca3b6a487f6d0be89d896b44f953d828 | |
parent | a3c220a197576176b403c8597adc67b85c0a3b9b (diff) | |
download | samba-6aebc19a887ba43961b04f0c7b93df7210e0918c.tar.gz |
Check for null tdb context in tdb_exists()
-rw-r--r-- | source/tdb/tdb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index c7b70aa1533..388f4f419fe 100644 --- a/source/tdb/tdb.c +++ b/source/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); |