[master] 1cf8057 Cave into to gcc49's paranoia...
Poul-Henning Kamp
phk at FreeBSD.org
Tue Feb 2 11:25:08 CET 2016
commit 1cf8057f687c74012f8a808647ca075a8effeed9
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Feb 2 10:24:50 2016 +0000
Cave into to gcc49's paranoia...
diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index bd524c5..5db516f 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -534,7 +534,7 @@ vcc_file_source(const struct vcp * const vcp, struct vsb *sb, const char *fn)
if (VFIL_searchpath(vcp->vcl_path, NULL, &f, fn, &fnp) || f == NULL) {
VSB_printf(sb, "Cannot read file '%s' (%s)\n",
fnp != NULL ? fnp : fn, strerror(errno));
- REPLACE(fnp, NULL);
+ free(fnp);
return (NULL);
}
sp = vcc_new_source(f, NULL, fnp);
diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c
index 62f39fc..38515b2 100644
--- a/lib/libvcc/vcc_vmod.c
+++ b/lib/libvcc/vcc_vmod.c
@@ -136,12 +136,13 @@ vcc_ParseImport(struct vcc *tl)
fnpx != NULL ? fnpx : fn);
VSB_printf(tl->sb, "\tdlerror: %s\n", dlerror());
vcc_ErrWhere(tl, mod);
- REPLACE(fnpx, NULL);
+ free(fnpx);
return;
}
+ AN(fnpx);
fnp = TlDup(tl, fnpx);
- REPLACE(fnpx, NULL);
+ free(fnpx);
bprintf(buf, "Vmod_%.*s_Data", PF(mod));
vmd = dlsym(hdl, buf);
More information about the varnish-commit
mailing list