Commit 07d2c391 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Ooops, last commit got one file more than intended.

Here is the fix for the regsub() issue: Don't release negative bytecounts,
we have the special variant WS_ReleaseP() just for jobs like this.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2792 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 50180b5f
......@@ -124,7 +124,6 @@ VRT_regsub(const struct sess *sp, int all, const char *str, void *re, const char
if (i == REG_NOMATCH)
return(str);
VSL(SLT_Debug, sp->fd, "REGSUB {");
u = WS_Reserve(sp->http->ws, 0);
res.e = res.b = b0 = sp->http->ws->f;
res.e += u;
......@@ -164,7 +163,6 @@ VSL(SLT_Debug, sp->fd, "REGSUB {");
return (str);
}
Tcheck(res);
WS_Release(sp->http->ws, b0 - res.b);
VSL(SLT_Debug, sp->fd, "REGSUB }");
WS_ReleaseP(sp->http->ws, res.b);
return (b0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment