diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-12 21:09:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-12 21:09:54 +0000 |
commit | 7b85c1edf6426e270978b06fc65367582dda9ec2 (patch) | |
tree | 27da1fdd7a1fdeaa4d0380026e418ecff6afb85c /mandoc_aux.c | |
parent | d8c6ba86ac437e53d413391925cc57114f4110b8 (diff) | |
download | mandoc-7b85c1edf6426e270978b06fc65367582dda9ec2.tar.gz |
Check the right pointer against NULL;
fixing a pasto introduced in the previous commit;
found by Svyatoslav Mishyn <juef at openmailbox dot org> with cppcheck.
Diffstat (limited to 'mandoc_aux.c')
-rw-r--r-- | mandoc_aux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mandoc_aux.c b/mandoc_aux.c index 30a3bd52..c83da7de 100644 --- a/mandoc_aux.c +++ b/mandoc_aux.c @@ -95,7 +95,7 @@ mandoc_strdup(const char *ptr) char *p; p = strdup(ptr); - if (ptr == NULL) + if (p == NULL) err((int)MANDOCLEVEL_SYSERR, NULL); return p; } |