mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Don't use explicit memory management
And avoid dangling pointers.
This commit is contained in:
parent
8a708fd97e
commit
bbd936fdfa
9 changed files with 28 additions and 36 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue