From: William Lallemand Date: Sun, 22 Aug 2021 11:36:11 +0000 (+0200) Subject: CLEANUP: ssl: remove useless check on p in openssl_version_parser() X-Git-Tag: v2.5-dev5~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b673f0fe3dfb16f509cccd5b84024b6304ddb2c;p=thirdparty%2Fhaproxy.git CLEANUP: ssl: remove useless check on p in openssl_version_parser() Remove a useless check on a pointer which reports a NULL dereference on coverity. Fixes issue #1358. --- diff --git a/src/ssl_utils.c b/src/ssl_utils.c index 20dcdb90cf..578212182d 100644 --- a/src/ssl_utils.c +++ b/src/ssl_utils.c @@ -373,11 +373,9 @@ unsigned int openssl_version_parser(const char *version) if (!strncmp(p, "beta", 4)) { p += 4; - if (p) { - status = strtol(p, &end, 10); - if (status > 14) - goto error; - } + status = strtol(p, &end, 10); + if (status > 14) + goto error; } } else { /* that's a patch release */