Commit 736389e7 authored by Nils Goroll's avatar Nils Goroll

Do not panic in fini if init fails

Fixes #2
parent 4fea5a62
Pipeline #157 skipped
# looks like -*- perl -*-
varnishtest "vcl.use and .discard, and version string"
server s1 {
} -start
varnish v1 -vcl+backend {
import blobcode from "${vmod_topbuild}/src/.libs/libvmod_blobcode.so";
} -start
varnish v1 -errvcl {Failed initialization} {
import blobcode from "${vmod_topbuild}/src/.libs/libvmod_blobcode.so";
backend default {
.host = "127.0.0.1";
}
sub vcl_init {
return (fail);
new id = blobcode.blob(IDENTITY, "foo");
}
}
......@@ -329,7 +329,9 @@ vmod_blob__fini(struct vmod_blobcode_blob **blobp)
{
struct vmod_blobcode_blob *b;
AN(*blobp);
if (*blobp == NULL)
return;
b = *blobp;
*blobp = NULL;
CHECK_OBJ_NOTNULL(b, VMOD_BLOBCODE_BLOB_MAGIC);
......
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