diff options
author | Sumit Bose <sbose@redhat.com> | 2009-11-04 16:41:09 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-04 10:51:08 -0500 |
commit | 6a8d1e90de09daa7dcbdcc548913946666f35ab1 (patch) | |
tree | 67ebfb9c85320f0ca44f0ccf7024df9bab9b3eec /server | |
parent | 980851d1848562405d9047b499f7faf489d9031a (diff) | |
download | sssd-6a8d1e90de09daa7dcbdcc548913946666f35ab1.tar.gz sssd-6a8d1e90de09daa7dcbdcc548913946666f35ab1.tar.bz2 sssd-6a8d1e90de09daa7dcbdcc548913946666f35ab1.zip |
Fix for a seg fault during recursive delete
Diffstat (limited to 'server')
-rw-r--r-- | server/db/sysdb_ops.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |