From 6a8d1e90de09daa7dcbdcc548913946666f35ab1 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 4 Nov 2009 16:41:09 +0100 Subject: Fix for a seg fault during recursive delete --- server/db/sysdb_ops.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/db') diff --git a/server/db/sysdb_ops.c b/server/db/sysdb_ops.c index 0dcf2e37..8e3b5dba 100644 --- a/server/db/sysdb_ops.c +++ b/server/db/sysdb_ops.c @@ -327,7 +327,7 @@ struct tevent_req *sysdb_delete_recursive_send(TALLOC_CTX *mem_ctx, struct tevent_req *req, *subreq; struct sysdb_delete_recursive_state *state; int ret; - const char *no_attrs[] = { NULL }; + const char **no_attrs; req = tevent_req_create(mem_ctx, &state, struct sysdb_delete_recursive_state); @@ -341,6 +341,12 @@ struct tevent_req *sysdb_delete_recursive_send(TALLOC_CTX *mem_ctx, state->msgs = NULL; state->current_item = 0; + no_attrs = talloc_array(state, const char *, 1); + if (no_attrs == NULL) { + ERROR_OUT(ret, ENOMEM, fail); + } + no_attrs[0] = NULL; + subreq = sysdb_search_entry_send(state, ev, handle, dn, LDB_SCOPE_SUBTREE, "(distinguishedName=*)", no_attrs); -- cgit