git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fb0143
)
Check for null tdb context in tdb_exists()
author
Tim Potter
<tpot@samba.org>
Wed, 1 Mar 2000 01:10:25 +0000
(
01:10
+0000)
committer
Tim Potter
<tpot@samba.org>
Wed, 1 Mar 2000 01:10:25 +0000
(
01:10
+0000)
(This used to be commit
bbacdb834f9c8f8c34368664def42dabe78d90c9
)
source3/tdb/tdb.c
patch
|
blob
|
history
diff --git
a/source3/tdb/tdb.c
b/source3/tdb/tdb.c
index c7b70aa15338f3d9058ae2d17e8d6a13dd84b2cb..388f4f419fe63e3ffcb0a20de84328dfaefa3a6c 100644
(file)
--- 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);