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)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 28 Oct 2009 23:44:33 +0000 (10:14 +1030)
commitb4424f8234a78a79fb2d71d46ca208b4f12e0f9e
tree51b84db81ee6ea5d0fd0e185efb6aa1b7d2b9330
parentcfed5f946de0992a594c189ee3c19cf98e59d380
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>
lib/tdb/common/open.c