git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3194ad2
)
Do not segfault in pdb_search_destructor if no real search was started
author
Volker Lendecke
<vl@samba.org>
Wed, 27 May 2009 16:40:13 +0000
(18:40 +0200)
committer
Volker Lendecke
<vl@samba.org>
Thu, 28 May 2009 08:52:04 +0000
(10:52 +0200)
source3/passdb/pdb_interface.c
patch
|
blob
|
history
diff --git
a/source3/passdb/pdb_interface.c
b/source3/passdb/pdb_interface.c
index 340867a5a6f1a974eb8cf8ace013f69229586cb4..164e5853df63f19d5063cee68b0a3993601d9b38 100644
(file)
--- a/
source3/passdb/pdb_interface.c
+++ b/
source3/passdb/pdb_interface.c
@@
-1711,7
+1711,7
@@
static NTSTATUS pdb_default_lookup_names(struct pdb_methods *methods,
static int pdb_search_destructor(struct pdb_search *search)
{
- if (
!search->search_ended
) {
+ if (
(!search->search_ended) && (search->search_end != NULL)
) {
search->search_end(search);
}
return 0;
@@
-1733,6
+1733,7
@@
struct pdb_search *pdb_search_init(TALLOC_CTX *mem_ctx,
result->num_entries = 0;
result->cache_size = 0;
result->search_ended = False;
+ result->search_end = NULL;
/* Segfault appropriately if not initialized */
result->next_entry = NULL;