Commit c7bde02d authored by Nils Goroll's avatar Nils Goroll

Don't panic in fini it init was never called

Ref: https://github.com/varnishcache/varnish-cache/issues/2297
parent a42d97a0
Pipeline #185 skipped
......@@ -221,6 +221,8 @@ vmod_policy__fini(struct vmod_hoailona_policy **policyp)
struct vmod_hoailona_policy *policy;
policy = *policyp;
if (policy == NULL)
return;
*policyp = NULL;
CHECK_OBJ_NOTNULL(policy, VMOD_HOAILONA_POLICY_MAGIC);
if (policy->vcl_name != NULL)
......@@ -268,6 +270,8 @@ vmod_hosts__fini(struct vmod_hoailona_hosts **hostsp)
struct host *host = NULL;
hosts = *hostsp;
if (hosts == NULL)
return;
*hostsp = NULL;
CHECK_OBJ_NOTNULL(hosts, VMOD_HOAILONA_HOSTS_MAGIC);
if (hosts->vcl_name != NULL)
......
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