diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-25 05:35:21 +0100 |
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-25 05:35:21 +0100 |
| commit | 5baac15781779a3ebfa3807299e5329809835370 (patch) | |
| tree | 0ea19612d064f02a8bd9fc62df1bef63da276e67 /source3/lib/ldb | |
| parent | c9d193eb08b036c5196d63c22790f3cd3583ba82 (diff) | |
| parent | 8b804077128cd981bf238b2506c589dff3bf8ff4 (diff) | |
| download | samba-5baac15781779a3ebfa3807299e5329809835370.tar.gz samba-5baac15781779a3ebfa3807299e5329809835370.tar.xz samba-5baac15781779a3ebfa3807299e5329809835370.zip | |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/lib/ldb')
| -rw-r--r-- | source3/lib/ldb/common/ldb.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/lib/ldb/common/ldb.c b/source3/lib/ldb/common/ldb.c index 6e28528dbf..cef7373c26 100644 --- a/source3/lib/ldb/common/ldb.c +++ b/source3/lib/ldb/common/ldb.c @@ -808,15 +808,18 @@ int ldb_search(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_result * va_list ap; int ret; + expression = NULL; res = NULL; *result = NULL; - va_start(ap, exp_fmt); - expression = talloc_vasprintf(mem_ctx, exp_fmt, ap); - va_end(ap); + if (exp_fmt) { + va_start(ap, exp_fmt); + expression = talloc_vasprintf(mem_ctx, exp_fmt, ap); + va_end(ap); - if ( ! expression) { - return LDB_ERR_OPERATIONS_ERROR; + if ( ! expression) { + return LDB_ERR_OPERATIONS_ERROR; + } } ret = _ldb_search(ldb, ldb, &res, base, scope, attrs, expression); |
