[master] f7ef41daa Plug minor leak
Federico Schwindt
fgsch at lodoss.net
Thu Jan 2 12:51:00 UTC 2020
Thank you. Happy new year to you as well.
I saw this after I committed it and pushed a workaround.
On Wed, Jan 1, 2020 at 8:59 AM Dridi Boukelmoune <dridi at varni.sh> wrote:
> On Wed, Jan 1, 2020 at 1:10 AM Federico G. Schwindt <fgsch at lodoss.net>
> wrote:
> >
> >
> > commit f7ef41daa750a5269e851c08650524a87246fa0d
> > Author: Federico G. Schwindt <fgsch at lodoss.net>
> > Date: Wed Jan 1 00:21:10 2020 +0000
> >
> > Plug minor leak
> >
> > diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c
> > index 2722488a1..7f62e8dbd 100644
> > --- a/bin/varnishtest/vtc_client.c
> > +++ b/bin/varnishtest/vtc_client.c
> > @@ -205,6 +205,8 @@ client_connect(struct vtclog *vl, struct client *c)
> > * Client thread
> > */
> >
> > +typedef void (*cleanup_f)(void *);
> > +
>
> Doesn't build everywhere:
>
>
> https://varnish-cache.org/vtest/attachment_f7ef41daa750a5269e851c08650524a87246fa0d_SunOS_i86pc_5.11_1.04_32_gcc4.7_uplex_distcheck.txt
>
> Happy new year!
>
> > static void *
> > client_thread(void *priv)
> > {
> > @@ -222,6 +224,7 @@ client_thread(void *priv)
> >
> > vsb = macro_expand(vl, c->connect);
> > AN(vsb);
> > + pthread_cleanup_push((cleanup_f)VSB_delete, vsb);
> > c->addr = VSB_data(vsb);
> >
> > if (c->repeat == 0)
> > @@ -243,8 +246,9 @@ client_thread(void *priv)
> > VTCP_close(&fd);
> > }
> > vtc_log(vl, 2, "Ending");
> > - VSB_destroy(&vsb);
> > pthread_cleanup_pop(0);
> > + pthread_cleanup_pop(0);
> > + VSB_delete(vsb);
> > vtc_logclose(vl);
> > return (NULL);
> > }
> > _______________________________________________
> > varnish-commit mailing list
> > varnish-commit at varnish-cache.org
> > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-commit/attachments/20200102/bc1f567a/attachment-0001.html>
More information about the varnish-commit
mailing list