From: "selvanair (Code Review)" Date: Mon, 27 Oct 2025 20:27:05 +0000 References: Reply-To: selva.nair@...277..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <4fe197a379436411793cc1124b11ec473af5a893-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="YYyYhPyB5qM="; 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: plaisthos , flichtenheld Cc: openvpn-devel --YYyYhPyB5qM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1317?usp=3Demail to review the following change. 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 --- M src/openvpn/pkcs11.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/17/1317/1 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: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I85320b8f1cfc02dfd561916e5637d9481edac59e Gerrit-Change-Number: 1317 Gerrit-PatchSet: 1 Gerrit-Owner: selvanair Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --YYyYhPyB5qM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

selvanair would like plaisthos and flichtenheld to review this change.

V= iew Change

pkcs11_management_id_get: Free certificate =
object after use

Found by ZeroPath

Change-Id: I85320b8f1cfc02= dfd561916e5637d9481edac59e
Signed-off-by: Selva Nair <selva.nair@...1665...= 77...>
---
M src/openvpn/pkcs11.c
1 file changed, 3 insertions(= +), 3 deletions(-)

git pull ssh://gerrit.openvpn=
.net:29418/openvpn refs/changes/17/1317/1
diff --git a/src/openvpn/=
pkcs11.c b/src/openvpn/pkcs11.c
index ce64135..9afb181 1006= 44
--- a/src/openvpn/pkcs11.c
+++ b/src/ope= nvpn/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 certi= ficate =3D NULL;
CK_RV rv =3D CKR_OK;
= unsigned char *certificate_blob =3D NULL;
@@ -548,6 +5= 45,9 @@
pkcs11h_certificate_freeCertificateIdList(id_l= ist);
id_list =3D NULL;

+ pkcs11h_certificate_freeCert= ificate(certificate);
+ certificate =3D NULL;
+
free(internal_id);
inter= nal_id =3D NULL;


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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I85320b8f1cfc02dfd561916e563= 7d9481edac59e
Gerrit-Change-Number: 1317
Gerrit-PatchSet: 1
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>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --YYyYhPyB5qM=--