[master] 9beaead OK, that was sort of embarrasing: Allocate enough space for *both* the two sess-> suckaddrs.

Poul-Henning Kamp phk at varnish-cache.org
Mon Oct 28 09:45:36 CET 2013


commit 9beaead5064f0a10731cac64372d28dc4082a7af
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 28 08:45:09 2013 +0000

    OK, that was sort of embarrasing:  Allocate enough space for *both*
    the two sess-> suckaddrs.

diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index 3d1964a..915aea6 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -464,7 +464,7 @@ SES_NewPool(struct pool *wp, unsigned pool_no)
 	pp->mpl_req = MPL_New(nb, &cache_param->req_pool,
 	    &cache_param->workspace_client);
 	bprintf(nb, "sess%u", pool_no);
-	ses_size = sizeof (struct sess) + vsa_suckaddr_len;
+	ses_size = sizeof (struct sess) + vsa_suckaddr_len * 2;
 	pp->mpl_sess = MPL_New(nb, &cache_param->sess_pool, &ses_size);
 	return (pp);
 }



More information about the varnish-commit mailing list