summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-01 16:14:01 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-01 16:30:08 +0100
commit2185f91568aa07e373722ca3d2412a99d59645e4 (patch)
tree2f82a73fa945b980e71d3c77d97b43eb31814094 /source4/dsdb
parentffc3f943cd9fbcc7dfdae6e843b2759a81e5b110 (diff)
downloadsamba-2185f91568aa07e373722ca3d2412a99d59645e4.tar.gz
samba-2185f91568aa07e373722ca3d2412a99d59645e4.tar.bz2
samba-2185f91568aa07e373722ca3d2412a99d59645e4.zip
s4:ranged results LDB module - "rr_search_callback" - change some memory context
"el->values" could under some circumstances be NULL (see "if" above).
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/ranged_results.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/ranged_results.c b/source4/dsdb/samdb/ldb_modules/ranged_results.c
index f8e8db60b7..97303598ec 100644
--- a/source4/dsdb/samdb/ldb_modules/ranged_results.c
+++ b/source4/dsdb/samdb/ldb_modules/ranged_results.c
@@ -168,7 +168,9 @@ static int rr_search_callback(struct ldb_request *req, struct ldb_reply *ares)
el->num_values++;
}
}
- el->name = talloc_asprintf(el->values, "%s;range=%u-%s", el->name, start, end_str);
+ el->name = talloc_asprintf(ares->message->elements,
+ "%s;range=%u-%s", el->name, start,
+ end_str);
if (!el->name) {
ldb_oom(ldb);
return ldb_module_done(ac->req, NULL, NULL,