diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-11-29 06:09:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:12 -0500 |
commit | 1c2ed583026631b94fc61a63e609eca2ad099bc1 (patch) | |
tree | cf8f74deecd490df3f7af7a7b26c00efce66d4bf /source3/lib | |
parent | 760c7a6534c2c7cf8d35eddf7971940379f683c3 (diff) | |
download | samba-1c2ed583026631b94fc61a63e609eca2ad099bc1.tar.gz samba-1c2ed583026631b94fc61a63e609eca2ad099bc1.tar.bz2 samba-1c2ed583026631b94fc61a63e609eca2ad099bc1.zip |
r19942: Fix Coverity id 333, a dereference before a NULL check.
Metze, you wanted to port talloc_get_type_abort() to 4. Should I just use it
in 3-ldb?
Volker
(This used to be commit ba0df1c915c49afad629df789375440225968633)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/ldb/ldb_tdb/ldb_index.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/lib/ldb/ldb_tdb/ldb_index.c b/source3/lib/ldb/ldb_tdb/ldb_index.c index d7a8e5e9b5..2c88d7e19d 100644 --- a/source3/lib/ldb/ldb_tdb/ldb_index.c +++ b/source3/lib/ldb/ldb_tdb/ldb_index.c @@ -721,12 +721,15 @@ static int ltdb_index_filter(const struct dn_list *dn_list, */ int ltdb_search_indexed(struct ldb_handle *handle) { - struct ltdb_context *ac = talloc_get_type(handle->private_data, struct ltdb_context); - struct ltdb_private *ltdb = talloc_get_type(ac->module->private_data, struct ltdb_private); + struct ltdb_context *ac; + struct ltdb_private *ltdb; struct dn_list *dn_list; int ret; - if ((ac == NULL) || (ltdb == NULL)) { + if (!(ac = talloc_get_type(handle->private_data, + struct ltdb_context)) || + !(ltdb = talloc_get_type(ac->module->private_data, + struct ltdb_private))) { return -1; } |