From: "cron2 (Code Review)" Date: Tue, 28 Oct 2025 09:23:55 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., selva.nair@...277..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <10943344e419d02f5d5ed86bb5d570e25c652f9e-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="tC7UGvC2zvE="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: pkcs11_management_id_get: Free certificate object after use List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: selvanair Cc: plaisthos , flichtenheld , openvpn-devel --tC7UGvC2zvE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/13= 17?usp=3Demail ) Change subject: pkcs11_management_id_get: Free certificate object after use ...................................................................... pkcs11_management_id_get: Free certificate object after use Found by ZeroPath Change-Id: I85320b8f1cfc02dfd561916e5637d9481edac59e Signed-off-by: Selva Nair Acked-by: Arne Schwabe Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1317 Message-Id: <20251027212747.4161-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33= 908.html Signed-off-by: Gert Doering --- M src/openvpn/pkcs11.c 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvpn/pkcs11.c b/src/openvpn/pkcs11.c index ce64135..9afb181 100644 --- a/src/openvpn/pkcs11.c +++ b/src/openvpn/pkcs11.c @@ -436,9 +436,6 @@ { pkcs11h_certificate_id_list_t id_list =3D NULL; pkcs11h_certificate_id_list_t entry =3D NULL; -#if 0 /* certificate_id seems to be unused -- JY */ - pkcs11h_certificate_id_t certificate_id =3D NULL; -#endif pkcs11h_certificate_t certificate =3D NULL; CK_RV rv =3D CKR_OK; unsigned char *certificate_blob =3D NULL; @@ -548,6 +545,9 @@ pkcs11h_certificate_freeCertificateIdList(id_list); id_list =3D NULL; + pkcs11h_certificate_freeCertificate(certificate); + certificate =3D NULL; + free(internal_id); internal_id =3D NULL; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1317?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I85320b8f1cfc02dfd561916e5637d9481edac59e Gerrit-Change-Number: 1317 Gerrit-PatchSet: 2 Gerrit-Owner: selvanair Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --tC7UGvC2zvE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

pkcs11_management_id_get: Free certificate objec=
t after use

Found by ZeroPath

Change-Id: I85320b8f1cfc02dfd56= 1916e5637d9481edac59e
Signed-off-by: Selva Nair <selva.nair@...277...= >
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Gerrit UR= L: https://gerrit.openvpn.net/c/openvpn/+/1317
Message-Id: <202510272= 12747.4161-1-gert@...1296...>
URL: https://www.mail-archive.com/openv= pn-devel@lists.sourceforge.net/msg33908.html
Signed-off-by: Gert Doering= <gert@...1296...>
---
M src/openvpn/pkcs11.c
1 file changed= , 3 insertions(+), 3 deletions(-)

diff --git a/src/openvpn/pkcs11.c b/src/openvpn/pkcs11.c
index ce64135..9afb181 100644
--- a/src/openvpn/pkcs11.c
+++ b/src/openvpn/pkcs11.c
@@ -436,9 +436,6 = @@
{
pkcs11h_certificate_id_list_t id= _list =3D NULL;
pkcs11h_certificate_id_list_t entry = =3D NULL;
-#if 0 /* cer= tificate_id seems to be unused -- JY */
- pkcs11h_certificate_id_t certificate_id =3D NULL;

-#endif
= pkcs11h_certificate_t certificate =3D NULL;
CK_RV r= v =3D CKR_OK;
unsigned char *certificate_blob =3D NULL= ;
@@ -548,6 +545,9 @@
pkcs11h_certific= ate_freeCertificateIdList(id_list);
id_list =3D NULL;<= /span>

+ = pkcs11h_certificate_freeCertificate(certificate);
+ certificate =3D NULL;
+

free(internal= _id);
internal_id =3D NULL;

To view, visit change 1317. To unsubscribe, or for = help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I85320b8f1cfc02dfd561916e563= 7d9481edac59e
Gerrit-Change-Number: 1317
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <selva.nair@...1354...= ..>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --tC7UGvC2zvE=--