summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_db.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c
index 25c6557c87..19799292ff 100644
--- a/source3/registry/reg_db.c
+++ b/source3/registry/reg_db.c
@@ -329,6 +329,10 @@ WERROR regdb_open( void )
int regdb_close( void )
{
+ if (tdb_refcount == 0) {
+ return 0;
+ }
+
tdb_refcount--;
DEBUG(10,("regdb_close: decrementing refcount (%d)\n", tdb_refcount));