From dbabbe180b157eeaac5002276667f1f56f0b4def Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 10 Jun 2025 22:35:56 +0200 Subject: [PATCH] Remove dead code from openssl_spki_new() implementation (#18752) If s is not NULL, the length can't be <= 0 because we at least append `spkac` in the string, which is non-empty. I noticed this condition because if it were actually possible to execute, then it would leak memory. --- ext/openssl/openssl.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 6518a719314..4d1567f56d8 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -652,10 +652,6 @@ cleanup: if (spki != NULL) { NETSCAPE_SPKI_free(spki); } - - if (s && ZSTR_LEN(s) <= 0) { - RETVAL_FALSE; - } } /* }}} */