Commit f70b607d authored by Nils Goroll's avatar Nils Goroll

fix forgotten WS_Release() call for failing WS_Reserve()

See also https://github.com/varnishcache/varnish-cache/issues/2967
for a general discussion regarding an inconsistency in the WS_Reserve()
interface
parent 7faa4316
......@@ -455,6 +455,7 @@ vmod_set_hasprefix(VRT_CTX, struct vmod_selector_set *set, VCL_STRING subject)
if ((match->limit = WS_ReserveLumps(ctx->ws, sizeof(unsigned))) == 0) {
VERRNOMEM(ctx, "Reserving index array in "
"%s.hasprefix(\"%.40s\")", set->vcl_name, subject);
WS_Release(ctx->ws, 0);
return (0);
}
match->indices = (unsigned *)WS_Front(ctx->ws);
......
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