diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2018-03-29 19:45:56 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2018-03-29 19:45:56 +0000 |
commit | feff6b99c312aa410a2189ffd5477fef1a99e1d8 (patch) | |
tree | 84baeb1dbf7b63e73fa16090870e2f7083e395a8 /usr.sbin | |
parent | 1b1964c6f5e29b3ca1029bc0c13ec38ef6e141d2 (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.c | 2 |
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; } |