Skip to content

Commit 28904e8

Browse files
olszomalmtrojnar
authored andcommitted
fix memory leak
1 parent 85b0eb6 commit 28904e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

osslsigncode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4839,10 +4839,8 @@ static char *find_pvk_key(GLOBAL_OPTIONS *options)
48394839
)
48404840
return NULL; /* FAILED */
48414841
btmp = BIO_new_file(options->keyfile, "rb");
4842-
if (!btmp) {
4843-
printf("Failed to read private key file: %s\n", options->keyfile);
4842+
if (!btmp)
48444843
return NULL; /* FAILED */
4845-
}
48464844
magic[0] = 0x00;
48474845
BIO_read(btmp, magic, 4);
48484846
if (!memcmp(magic, pvkhdr, 4)) {
@@ -5026,6 +5024,8 @@ static void free_crypto_params(CRYPTO_PARAMS *cparams)
50265024
cparams->certs = NULL;
50275025
sk_X509_pop_free(cparams->xcerts, X509_free);
50285026
cparams->xcerts = NULL;
5027+
sk_X509_CRL_pop_free(cparams->crls, X509_CRL_free);
5028+
cparams->crls = NULL;
50295029
}
50305030

50315031
static void free_options(GLOBAL_OPTIONS *options)

0 commit comments

Comments
 (0)