summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbtest.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-01 20:26:12 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-09 18:59:19 +0100
commit5e06b21cc1553606efaeae03504e91d811793085 (patch)
tree97d05890620044039ec8bd7d7f38e0c85ffa14d4 /source4/lib/ldb/tools/ldbtest.c
parent22f4030c303224ecc7ee28b0b93d80d27869a4a0 (diff)
downloadsamba-5e06b21cc1553606efaeae03504e91d811793085.tar.gz
samba-5e06b21cc1553606efaeae03504e91d811793085.tar.bz2
samba-5e06b21cc1553606efaeae03504e91d811793085.zip
ldb:tools - always check if ldb connection has been estabilished
Otherwise return "LDB_ERR_OPERATIONS_ERROR".
Diffstat (limited to 'source4/lib/ldb/tools/ldbtest.c')
-rw-r--r--source4/lib/ldb/tools/ldbtest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c
index f8035630b9..45d16bad4a 100644
--- a/source4/lib/ldb/tools/ldbtest.c
+++ b/source4/lib/ldb/tools/ldbtest.c
@@ -405,6 +405,9 @@ int main(int argc, const char **argv)
struct ldb_context *ldb;
ldb = ldb_init(mem_ctx, NULL);
+ if (ldb == NULL) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
options = ldb_cmdline_process(ldb, argc, argv, usage);