[master] 37eb85b Don't derefrence NULL pointers
Poul-Henning Kamp
phk at FreeBSD.org
Mon May 15 22:00:07 CEST 2017
commit 37eb85ba98cc8ae6d10f2f2218cfd639fff38a42
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon May 15 19:56:47 2017 +0000
Don't derefrence NULL pointers
diff --git a/lib/libvarnish/vin.c b/lib/libvarnish/vin.c
index 9e47867..fecc554 100644
--- a/lib/libvarnish/vin.c
+++ b/lib/libvarnish/vin.c
@@ -91,7 +91,8 @@ VIN_n_Arg(const char *n_arg, char **name, char **dir)
if (dir != NULL) {
*dir = strdup(dn);
if (*dir == NULL) {
- free(*name);
+ if (name != NULL)
+ free(*name);
return (-1);
}
}
More information about the varnish-commit
mailing list