1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

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)
This commit is contained in:
Volker Lendecke 2006-11-29 06:09:24 +00:00 committed by Gerald (Jerry) Carter
parent 760c7a6534
commit 1c2ed58302

View File

@ -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;
}