mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Don't use explicit memory management
And avoid dangling pointers. Original PR #16705.
This commit is contained in:
@@ -279,8 +279,9 @@ namespace
|
||||
if (!uuid.isNull())
|
||||
return uuid.toString().toUpper(); // Libtorrent expects the GUID in uppercase
|
||||
|
||||
const std::wstring nameWStr = name.toStdWString();
|
||||
NET_LUID luid {};
|
||||
const LONG res = ::ConvertInterfaceNameToLuidW(name.toStdWString().c_str(), &luid);
|
||||
const LONG res = ::ConvertInterfaceNameToLuidW(nameWStr.c_str(), &luid);
|
||||
if (res == 0)
|
||||
{
|
||||
GUID guid;
|
||||
|
||||
Reference in New Issue
Block a user