summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2018-03-29 19:45:56 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2018-03-29 19:45:56 +0000
commitfeff6b99c312aa410a2189ffd5477fef1a99e1d8 (patch)
tree84baeb1dbf7b63e73fa16090870e2f7083e395a8 /usr.sbin
parent1b1964c6f5e29b3ca1029bc0c13ec38ef6e141d2 (diff)
Check the result of strdup not the argument for NULL to report malloc
errors. Pointed out by benno
Diffstat (limited to 'usr.sbin')
-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;
}