Skip to content

Commit

Permalink
gnupg-pkcs11-scd: Fix memory leak in listing certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
rkeene authored and alonbl committed Oct 17, 2022
1 parent 186ddf6 commit 8f723d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Copyright (c) 2006-2022 Alon Bar-Lev <alon.barlev@gmail.com>

????-??-?? - Version ?.?.?

* Fix memory leak when reading invalid certificate, thanks to Roy Keene.

2022-01-04 - Version 0.10.0

Expand Down
5 changes: 5 additions & 0 deletions gnupg-pkcs11-scd/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ send_certificate_list (

retry:

if (sexp != NULL) {
gcry_sexp_release (sexp);
sexp = NULL;
}

if (info_cert != NULL) {
free (info_cert);
info_cert = NULL;
Expand Down

0 comments on commit 8f723d1

Please sign in to comment.