Commit d055f0f9 authored by Geoff Simmons's avatar Geoff Simmons

Don't crash on set object finalization if the constructor failed.

parent b11bcf94
......@@ -577,9 +577,11 @@ vmod_set__fini(struct vmod_re2_set **setp)
{
struct vmod_re2_set *set;
if (setp == NULL || *setp == NULL)
return;
CHECK_OBJ(*setp, VMOD_RE2_SET_MAGIC);
set = *setp;
*setp = NULL;
CHECK_OBJ_NOTNULL(set, VMOD_RE2_SET_MAGIC);
vre2set_fini(&set->set);
if (set->vcl_name != NULL)
free(set->vcl_name);
......
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