diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/tools/ldbadd.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbdel.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbedit.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbmodify.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbrename.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbsearch.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbtest.c | 3 |
7 files changed, 19 insertions, 1 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c index 464b14393c..184fba5dd7 100644 --- a/source4/lib/ldb/tools/ldbadd.c +++ b/source4/lib/ldb/tools/ldbadd.c @@ -106,6 +106,9 @@ int main(int argc, const char **argv) TALLOC_CTX *mem_ctx = talloc_new(NULL); ldb = ldb_init(mem_ctx, NULL); + if (ldb == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c index 5c344c67c7..274a41c6e9 100644 --- a/source4/lib/ldb/tools/ldbdel.c +++ b/source4/lib/ldb/tools/ldbdel.c @@ -90,6 +90,9 @@ int main(int argc, const char **argv) TALLOC_CTX *mem_ctx = talloc_new(NULL); ldb = ldb_init(mem_ctx, NULL); + if (ldb == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c index 09c59cf6cd..a046b17d5d 100644 --- a/source4/lib/ldb/tools/ldbedit.c +++ b/source4/lib/ldb/tools/ldbedit.c @@ -306,6 +306,9 @@ int main(int argc, const char **argv) struct ldb_control **req_ctrls; ldb = ldb_init(mem_ctx, NULL); + if (ldb == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbmodify.c b/source4/lib/ldb/tools/ldbmodify.c index 15f8b2f3f1..8d5e04b81c 100644 --- a/source4/lib/ldb/tools/ldbmodify.c +++ b/source4/lib/ldb/tools/ldbmodify.c @@ -97,6 +97,9 @@ int main(int argc, const char **argv) TALLOC_CTX *mem_ctx = talloc_new(NULL); ldb = ldb_init(mem_ctx, NULL); + if (ldb == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbrename.c b/source4/lib/ldb/tools/ldbrename.c index e4087f42b8..518358c9a3 100644 --- a/source4/lib/ldb/tools/ldbrename.c +++ b/source4/lib/ldb/tools/ldbrename.c @@ -54,6 +54,9 @@ int main(int argc, const char **argv) TALLOC_CTX *mem_ctx = talloc_new(NULL); ldb = ldb_init(mem_ctx, NULL); + if (ldb == NULL) { + return LDB_ERR_OPERATIONS_ERROR; + } options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c index 10fab25a6a..cd746749d0 100644 --- a/source4/lib/ldb/tools/ldbsearch.c +++ b/source4/lib/ldb/tools/ldbsearch.c @@ -277,7 +277,7 @@ int main(int argc, const char **argv) ldb = ldb_init(mem_ctx, NULL); if (ldb == NULL) { - return -1; + return LDB_ERR_OPERATIONS_ERROR; } options = ldb_cmdline_process(ldb, argc, argv, usage); 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); |