On Mon, 2012-12-10 at 18:10 +0100, Jakub Hrozek wrote: > 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.
Ah sorry, it is there, but I was also wondering if you shouldn't call unlink ? After all if you fail here you just have created an empty file, and I am not sure we want to leave it around. I know the code did not unlink but given you are fixing this already ... Simo. -- Simo Sorce * Red Hat, Inc * New York _______________________________________________ sssd-devel mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
