Patch to nALFS

Neven Has haski at sezampro.yu
Sat Mar 8 08:46:37 PST 2003


On Sat, Mar 08, 2003 at 11:46:29AM +0100, Vassili Dzuba wrote:
> curd <curd at pandora.be> wrote:
> > This is a great feature, but it didn't work for me.
> > The filename was displayed properly in the profile,
> > but the file that was being fetched (I use wget), had some
> > funny characters appended to it.
> > Now my knowledge of C is very limited to say the least, but figuring 
> > that there was
> > maybe something wrong with the wget routine, I managed to get it working
> > like this:
> > 
> > --- new-download.c.orig 2003-03-08 00:31:34.000000000 +0100
> > +++ new-download.c      2003-03-08 00:26:54.000000000 +0100
> > @@ -211,12 +211,12 @@
> >  #ifdef HAVE_LIBCURL
> >         status = load_url(file, url);
> >  #else
> > -       status = execute_command("wget --progress=dot -O %s %s%s", file, 
> > url);
> > +       status = execute_command("wget --progress=dot -O %s %s", file, url);
> >  #endif
> >  
> >         if (status) {
> >                 Nprint_h_err("Getting url failed:");
> > -               Nprint_h_err("    %s%s", url);
> > +               Nprint_h_err("    %s", url);
> >  
> >                 /* TODO: Should we delete the broken archive here? */
> 
> Yes, that's a bug. I've put the corrected version on the site.

A few things:

+  Am I blind, or did you fix only the printing part? :)

+  There is a memory leak in the <url> loop, after successfully getting it.

+  Also, digest never gets freed (this exists in new-unpack.c too).

+  I guess I shouldn't have moved verify_digest() and get_url() to
   new-unpack.c, now we have duplicate code.  But I'm not sure that
   it really belongs in utility.c?

+  And one older thing I have noticed in new-unpack.c -- a memory leak
   with El_unpack_reference.


Neven

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list