summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-05-07 12:59:49 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-05-09 04:29:48 +0200
commit3b069156639e4d53f8bd392fe6a21c36ff0caa99 (patch)
tree7cbd1b969e327b6a34aede6ea6f98cde58fe1c72
parentdaf79e5b35b354200b26b2b0fac3487287ffa720 (diff)
downloadsamba-3b069156639e4d53f8bd392fe6a21c36ff0caa99.tar.gz
ldb: Reset errno before checking it in ltdb_connect()
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
-rw-r--r--lib/ldb/ldb_tdb/ldb_tdb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c
index 93fc96faca3..f9bc35ca0fb 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -2355,6 +2355,7 @@ int ltdb_connect(struct ldb_context *ldb, const char *url,
ltdb->kv_ops = &key_value_ops;
+ errno = 0;
/* note that we use quite a large default hash size */
ltdb->tdb = ltdb_wrap_open(ltdb, path, 10000,
tdb_flags, open_flags,