File descriptor leak in tdlookup.c:respond

Matthew Dempsky <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
Has anyone noticed there's a potential file descriptor leak in
tdlookup.c's respond() function?  I searched for this issue for a
little bit, and I couldn't find anything about it.

If there's a cdb_read error while looking up the client's location,
then the data.cdb file descriptor is never closed.  (cdb_free(&c) is
also not called, but cdb_init(&c,fd) first calls cdb_free(&c), so it
doesn't leak memory.)  In practice, I don't think this is a problem
because I think the only reason cdb_read might realistically error is
because of a misformatted cdb file, which tinydns-data won't build.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.