diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-01-10 14:30:37 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2023-02-04 14:03:13 +0100 |
commit | 337dbc392253af92b0577da062a5abc1d032b1ef (patch) | |
tree | e540dc7dc861f575d841970561651a9fac506120 /win/vncconfig/Authentication.h | |
parent | dde95fccca9fffff0da2dc486d639b162115bb9e (diff) | |
download | tigervnc-337dbc392253af92b0577da062a5abc1d032b1ef.tar.gz tigervnc-337dbc392253af92b0577da062a5abc1d032b1ef.zip |
Return std::string instead of dynamic allocations
We mostly use classical C strings, but the memory management around them
can get confusing and error prone. Let's use std::string for the cases
where we need to return a newly allocated string.
Diffstat (limited to 'win/vncconfig/Authentication.h')
-rw-r--r-- | win/vncconfig/Authentication.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win/vncconfig/Authentication.h b/win/vncconfig/Authentication.h index 6789a4f2..cc162077 100644 --- a/win/vncconfig/Authentication.h +++ b/win/vncconfig/Authentication.h @@ -93,8 +93,8 @@ namespace rfb { #ifdef HAVE_GNUTLS if (isItemChecked(IDC_ENC_X509)) { - SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Cert")); - SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Key")); + SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Cert").c_str()); + SSecurityTLS::X509_CertFile.setParam(regKey.getString("X509Key").c_str()); } #endif |