[Digikam-devel] [patch] Re: digikam and can't umount

Gilles Caulier caulier.gilles at free.fr
Thu Jan 12 06:38:30 GMT 2006


Le Jeudi 12 Janvier 2006 02:26, Achim Bohnet a écrit :
> On Wednesday 11 January 2006 12:19, Achim Bohnet wrote:
> > Hi Kévin, Jean-Rémy,  Digikam devels
> >
> > with digikam from stable one can't umount an usbdisk
> > camera while digikam is running.
>
> Hi,
>
> this is a minimalistic patch to fix the cornercase of
> unsupported file format (e.g. video files) on usb storage.
>
> the patch is minimalistic because it fixes only one of several
> leak or return statements without closing ifp (and tfp) later.
>
> Gilles: I know you want to keep the changes to this file minimal
> to make merging with upstream easier.  Can you fix all leaks in
> a way that least distrubs your future merges?   Or should I just
> add lots of fclose or goto in stable branch?  And you care about
> a real fix in trunk?
>
> Tom: the bug is independent of your media:/ code (I love it!) you
> added and is disabled now.  The bug was just not noticed  ;)
> What other open 'awkward corner cases' have you in mind
> beside my awkward wish add-umount-menuitem-for-mounted-usbdisks? ;)
>
> Achim
>
> Index: libs/dcraw/dcraw_parse.cpp
> ===================================================================
> --- libs/dcraw/dcraw_parse.cpp  (revision 497117)
> +++ libs/dcraw/dcraw_parse.cpp  (working copy)
> @@ -1255,7 +1255,8 @@
>    parse_mos(0);
>    parse_jpeg(0);
>    if (model[0] == 0) {
> -    kdDebug() << "unsupported file format." << endl;
> +    kdDebug() << "dcraw_parse: unsupported file format." << endl;
> +    fclose(ifp);
>      return 1;
>    }
>    kdDebug() << "Findings for " << infile << ":" << endl;
>

Damned !!! and i have checked this part and found this problem using valgrind 
when i have completed dcraw_parse.cpp implementation in the past... but I 
have forget to fix it. All my appologies !

Fixed in trunk and stable. Thanks for this report !

Gilles



More information about the Digikam-devel mailing list