On Sat, Aug 20, 2011 at 09:14:30AM +0100, Stuart Henderson wrote:
> On 2011/08/20 03:37, Christiano F. Haesbaert wrote:
> > Hi there, this fixes a segfault seen by sthen@ which I could only
> > reproduce yesterday. I had fogotten to event_del() a persistent event.
>
> Ah yes that makes sense, and it fixes my problem. Thanks!
> OK to commit it?
>
Sure. OK claudio
> > Index: tcpbench.c
> > ===================================================================
> > RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.c,v
> > retrieving revision 1.22
> > diff -d -u -p -w -r1.22 tcpbench.c
> > --- tcpbench.c 21 Jun 2011 17:31:07 -0000 1.22
> > +++ tcpbench.c 20 Aug 2011 06:34:06 -0000
> > @@ -642,6 +642,7 @@ again:
> > } else if (n == 0) {
> > if (ptb->vflag)
> > fprintf(stderr, "%8d closed by remote end\n", sc->fd);
> > + event_del(&sc->ev);
> > close(sc->fd);
> > TAILQ_REMOVE(&sc_queue, sc, entry);
> > free(sc);
>
--
:wq Claudio