Commit 6d85d03b authored by Geoff Simmons's avatar Geoff Simmons

Fix a leak in match_dyn, spotted by Greg Bock.

Closes #2
parent b994b9a5
Pipeline #206 skipped
...@@ -270,6 +270,7 @@ vmod_match_dyn(VRT_CTX, struct vmod_priv *task, VCL_STRING pattern, ...@@ -270,6 +270,7 @@ vmod_match_dyn(VRT_CTX, struct vmod_priv *task, VCL_STRING pattern,
vre_t *vre; vre_t *vre;
int erroffset; int erroffset;
const char *error; const char *error;
VCL_BOOL dyn_return;
AN(pattern); AN(pattern);
AN(task); AN(task);
...@@ -282,7 +283,9 @@ vmod_match_dyn(VRT_CTX, struct vmod_priv *task, VCL_STRING pattern, ...@@ -282,7 +283,9 @@ vmod_match_dyn(VRT_CTX, struct vmod_priv *task, VCL_STRING pattern,
pattern, error, erroffset); pattern, error, erroffset);
return 0; return 0;
} }
return match(ctx, vre, subject, task); dyn_return = match(ctx, vre, subject, task);
VRE_free(&vre);
return dyn_return;
} }
VCL_STRING VCL_STRING
......
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