diff options
author | Simo Sorce <idra@samba.org> | 2006-03-06 21:40:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:20 -0500 |
commit | eec236c1f295ff4e60b4d88db440771a18e0a6e3 (patch) | |
tree | 47a245605526dabfa6e314ea83314a7e6a274089 /source4/lib/ldb | |
parent | 86dda205623926e83d28a20d0b4d87ea1ac11824 (diff) | |
download | samba-eec236c1f295ff4e60b4d88db440771a18e0a6e3.tar.gz samba-eec236c1f295ff4e60b4d88db440771a18e0a6e3.tar.xz samba-eec236c1f295ff4e60b4d88db440771a18e0a6e3.zip |
r13900: don't segfault on error
(This used to be commit cf7ad707578ee4dbd5dbf3c83f1f4ede42de3835)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index b664ba680d..4b4cc30de8 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -305,10 +305,10 @@ int ldb_request(struct ldb_context *ldb, struct ldb_request *request) /* the search call is the only one that returns something other than a status code. We steal the results into the context of the ldb before freeing the request */ - if (request->operation == LDB_REQ_SEARCH) { + if (status == LDB_SUCCESS && request->operation == LDB_REQ_SEARCH) { request->op.search.res = talloc_steal(ldb, r->op.search.res); } - if (request->operation == LDB_ASYNC_SEARCH) { + if (status == LDB_SUCCESS && request->operation == LDB_ASYNC_SEARCH) { request->async.handle = r->async.handle; } talloc_free(r); |