Sounds right!

But if you are running that low on memory a leaked file handle is the least
of your problems :D

It should of course be fixed though!


Regards, Klaus Post

http://www.klauspost.com


On Wed, Sep 21, 2011 at 19:22, Ille <[email protected]> wrote:

> Looking at the RAWFILE *raw_open_file(const gchar *filename), I think
> I found a bug; if the opening of the file succeed, but mmap fail, the
> file seems to remain opened:
>
> Here's the code:
>
>        if ((fd = open(filename, O_RDONLY)) == -1)
>        {
>                g_free(rawfile);
>                return(NULL);
>        }
>        rawfile->map = mmap(NULL, rawfile->size, PROT_READ, MAP_SHARED,
>        fd, 0); if(rawfile->map == MAP_FAILED)
>        {
>                g_free(rawfile);
> -------------->
> |               return(NULL);
> |       }
> |
> |___ shouldn't we have "close(fd);" here?
>
> But maybe I'm wrong, as I'm not a real programer.
>
> Regards,
> Ille
>
> Le Wed, 21 Sep 2011 10:28:49 +0200,
> Ille <[email protected]> a écrit :
>
> > Hi,
> >
> > I'm trying to make a better loader for x3f raw files.
> > I will probably try to implement the algorithm used by Roland Karlsson
> > ([email protected]) in his Rolkar_X3F tool to decode x3f from DPs and
> > SD15.
> > My questions are the following:
> > - Roland Karlsson sources are under BSD-style license. Will this be a
> >   problem, as RawStudio is under GPL?
> > - Should I reuse Dave Coffin's algorithm for foveon interpolation? I
> >   mean, I would prefer to get free of all bayers specific function and
> >   have something dedicated for foveon sensor.
> > - Finally, does it make sense to create a RAWFILE* in the loader?
> >
> > Regards,
> > Ille
> >
> > _______________________________________________
> > Rawstudio-dev mailing list
> > [email protected]
> > http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev
>
> _______________________________________________
> Rawstudio-dev mailing list
> [email protected]
> http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev
>
_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to