diff options
author | Günther Deschner <gd@samba.org> | 2008-01-04 12:57:49 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-01-04 12:58:09 +0100 |
commit | 5c09517d7d9fa6252e5cece990f56fcb525414e0 (patch) | |
tree | 4f952cead82d23c8ebdff8d7be1b23508283418c | |
parent | cf6e59de2b475e14660a9b71daad2ab5699d53a7 (diff) | |
download | samba-5c09517d7d9fa6252e5cece990f56fcb525414e0.tar.gz samba-5c09517d7d9fa6252e5cece990f56fcb525414e0.tar.bz2 samba-5c09517d7d9fa6252e5cece990f56fcb525414e0.zip |
Fix crash bug in regdb_close() when called with no ref count.
Michael, please check.
Guenther
(This used to be commit d6575ff5d240ec431b6e837494913dbd06e5a299)
-rw-r--r-- | source3/registry/reg_db.c | 4 |
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)); |