diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2023-12-03 11:29:52 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-12-12 19:48:50 +0100 |
commit | 01709fcb8b609cfc47e277d20492c333bafb113e (patch) | |
tree | 6e6b01c02048fbda8c6f53e60a6b031a16ce1503 /apps | |
parent | ba4d833f6e24a83bc3e74ba55f52d8916b70fb59 (diff) |
Fix a possible memleak in apps/rehash.c
The OPENSSL_DIR_end was missing in case of error.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22920)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/rehash.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/rehash.c b/apps/rehash.c index 4fea16fa38..56a6ccea09 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -383,6 +383,7 @@ static int do_dir(const char *dirname, enum Hash h) if ((copy = OPENSSL_strdup(filename)) == NULL || sk_OPENSSL_STRING_push(files, copy) == 0) { OPENSSL_free(copy); + OPENSSL_DIR_end(&d); BIO_puts(bio_err, "out of memory\n"); errs = 1; goto err; |