The homedir is statically owned, so don't free it!
Some checks failed
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
Some checks failed
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
This fixes at least one regression.
This commit is contained in:
@ -935,8 +935,7 @@ CharPtrNoStringConversion dGetcwd (void)
|
|||||||
std::optional< std::string >
|
std::optional< std::string >
|
||||||
dGethomedir_string()
|
dGethomedir_string()
|
||||||
{
|
{
|
||||||
auto owned= Alepha::AutoRAII< char * >{ dGethomedir, dFree };
|
const char *const ptr= dGethomedir();
|
||||||
const char *const ptr= owned;
|
|
||||||
|
|
||||||
if( not ptr ) return std::nullopt;
|
if( not ptr ) return std::nullopt;
|
||||||
return ptr;
|
return ptr;
|
||||||
|
Reference in New Issue
Block a user