* [pve-devel] [PATCH common] fix #3259: always free certificate file after reading it
@ 2021-02-11 18:19 Stoiko Ivanov
2021-02-19 14:37 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2021-02-11 18:19 UTC (permalink / raw)
To: pve-devel
This commit mirrors e3c4007bc94956962c03da8c6853415d2fdf057c in
pve-cluster. The fix there got lost with a refactoring for reusing the
code here in pve-common in c92b771669e68a8b49906b8a0a68b533750567b0
Tested by repeadetly reading https://$pve-node:8006/nodes on a
virtual testcluster.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PVE/Certificate.pm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/PVE/Certificate.pm b/src/PVE/Certificate.pm
index 5bc9848..31a7722 100644
--- a/src/PVE/Certificate.pm
+++ b/src/PVE/Certificate.pm
@@ -199,10 +199,8 @@ my $read_certificate = sub {
or $ssl_die->("unable to read '$cert_path' - $!\n");
my $cert = Net::SSLeay::PEM_read_bio_X509($bio);
- if (!$cert) {
- Net::SSLeay::BIO_free($bio);
- die "unable to read certificate from '$cert_path'\n";
- }
+ Net::SSLeay::BIO_free($bio);
+ die "unable to read certificate from '$cert_path'\n" if !$cert;
return $cert;
};
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH common] fix #3259: always free certificate file after reading it
2021-02-11 18:19 [pve-devel] [PATCH common] fix #3259: always free certificate file after reading it Stoiko Ivanov
@ 2021-02-19 14:37 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-02-19 14:37 UTC (permalink / raw)
To: Proxmox VE development discussion, Stoiko Ivanov
On 11.02.21 19:19, Stoiko Ivanov wrote:
> This commit mirrors e3c4007bc94956962c03da8c6853415d2fdf057c in
> pve-cluster. The fix there got lost with a refactoring for reusing the
> code here in pve-common in c92b771669e68a8b49906b8a0a68b533750567b0
>
> Tested by repeadetly reading https://$pve-node:8006/nodes on a
> virtual testcluster.
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> src/PVE/Certificate.pm | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-19 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 18:19 [pve-devel] [PATCH common] fix #3259: always free certificate file after reading it Stoiko Ivanov
2021-02-19 14:37 ` [pve-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal