diff options
-rw-r--r-- | lib/tdb/common/open.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c index 0454c8bb50..789bc73d3d 100644 --- a/lib/tdb/common/open.c +++ b/lib/tdb/common/open.c @@ -170,6 +170,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td const struct tdb_logging_context *log_ctx, tdb_hash_func hash_fn) { + int orig_errno = errno; struct tdb_header header; struct tdb_context *tdb; struct stat st; @@ -489,6 +490,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td } tdb->next = tdbs; tdbs = tdb; + errno = orig_errno; return tdb; fail: |