From: Tomas Mraz Date: Wed, 9 Jun 2021 14:42:35 +0000 (+0200) Subject: dl_name_converter: Avoid unnecessary overallocation X-Git-Tag: openssl-3.0.0-beta1~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d475a9efcfb98fe2d207dbc56bed931ee35b74a6;p=thirdparty%2Fopenssl.git dl_name_converter: Avoid unnecessary overallocation Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15680) --- diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index e41648548ea..8d440ab3e2c 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -224,7 +224,7 @@ static char *dl_name_converter(DSO *dso, const char *filename) len = strlen(filename); rsize = len + 1; transform = (strstr(filename, "/") == NULL); - { + if (transform) { /* We will convert this to "%s.s?" or "lib%s.s?" */ rsize += strlen(DSO_EXTENSION); /* The length of ".s?" */ if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)