tdb: reset tdb->fd to -1 in tdb_close()
authorKirill Smelkov <kirr@mns.spb.ru>
Wed, 21 Oct 2009 17:18:56 +0000 (21:18 +0400)
committerStefan Metzmacher <metze@samba.org>
Wed, 16 Dec 2009 07:03:53 +0000 (08:03 +0100)
commitf5c992bdaeb73ef726ff4728a9922721474cd6f5
tree5c84c7e945d64b28280773e0f81958cc30fecd93
parent76aacdd8e1106f26565e25903091a757b59cd7e2
tdb: reset tdb->fd to -1 in tdb_close()

So that erroneous double tdb_close() calls do not try to close() same
fd again. This is like SAFE_FREE() but for fd.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit b4424f8234a78a79fb2d71d46ca208b4f12e0f9e)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/tdb/common/open.c