summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2018-03-29 19:45:55 +0000
committerflorian <florian@openbsd.org>2018-03-29 19:45:55 +0000
commit9cf2379cba5efd2a569a6948b1e06b39d62fef3b (patch)
tree1e4c34e4257140e15cfb4195f385f8708d4bd979
parentupdate to unbound 1.7.0 (diff)
downloadwireguard-openbsd-9cf2379cba5efd2a569a6948b1e06b39d62fef3b.tar.xz
wireguard-openbsd-9cf2379cba5efd2a569a6948b1e06b39d62fef3b.zip
Check the result of strdup not the argument for NULL to report malloc
errors. Pointed out by benno
-rw-r--r--usr.sbin/unbound/services/authzone.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/unbound/services/authzone.c b/usr.sbin/unbound/services/authzone.c
index 13e36b2cbee..fac8e4ed1c2 100644
--- a/usr.sbin/unbound/services/authzone.c
+++ b/usr.sbin/unbound/services/authzone.c
@@ -5946,7 +5946,7 @@ static char*
dup_all(char* str)
{
char* result = strdup(str);
- if(!str) {
+ if(!result) {
log_err("malloc failure");
return NULL;
}