On Mon, Dec 10, 2012 at 09:06:16AM -0500, Simo Sorce wrote:
On Mon, 2012-12-10 at 08:39 +0100, Jakub Hrozek wrote:
> Coverity bug again.
>
>
https://fedorahosted.org/sssd/ticket/1704
Any reason why you do not close the file anymore in a lock error ?
I know the caller will also cleanup but I would expect that if the
create function fails no file is open and no file is on disk ...
Hmm, did I attach the wrong patch? In the version I have in tree, there
is close(mc_ctx->fd); called in case sss_br_lock_file() fails. It's not
very readable from the diff itself, but in the source, the close would be
on line 721 in src/responder/nss/nsssrv_mmap_cache.c
Anyway, I'm attaching the patch again.