On Thu, May 14, 2009 at 11:09:17AM -0400, David Korn wrote:
> cc: [email protected]
> Subject: Re: [ast-users] Re: Assigning to SECONDS in a subshell causes
> corruption/crash
> --------
>
> The patch is ok except that
> mp->nvalue.cp=(char *)0x0;
> should not be necessary since it should already be 0 from the previious
> nv_free() call.
>
> > -- src/cmd/ksh93/sh/subshell.c.orig 2009-05-11 11:33:50.000000000 +0200
> > +++ src/cmd/ksh93/sh/subshell.c 2009-05-13 11:39:03.000000000 +0200
> > @@ -236,7 +236,10 @@
> > mp->nvfun = np->nvfun;
> > mp->nvflag = np->nvflag;
> > if(nv_cover(mp))
> > - nv_putval(mp, np->nvalue.cp,0);
> > + {
> > + mp->nvalue.cp=(char *)0x0;
> > + nv_putval(mp, nv_getval(np),0);
> > + }
> > else
> > mp->nvalue.cp = np->nvalue.cp;
> > np->nvfun = 0;
> >
> >
> >
Question:
A few lines below is there a `nv_free(np);' missed before the `free((void*)np);'
or does this not matter?
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users