mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Free converted file paths in Xdnd proxy
This commit is contained in:
@@ -8,6 +8,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed a minor memory leak in the Wine->X11 drag-and-drop implementation when
|
||||
converting Windows file paths.
|
||||
|
||||
### yabridgectl
|
||||
|
||||
- Added support for setting up CLAP plugins.
|
||||
|
||||
@@ -847,7 +847,7 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/,
|
||||
|
||||
// Normalize the paths to something a bit more
|
||||
// friendly
|
||||
const char* unix_path =
|
||||
char* unix_path =
|
||||
wine_get_unix_file_name(file_name.data());
|
||||
if (unix_path) {
|
||||
std::error_code err;
|
||||
@@ -860,6 +860,10 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/,
|
||||
dragged_files.emplace_back(
|
||||
cannonical_path);
|
||||
}
|
||||
|
||||
// Can't use regular `free()` or
|
||||
// `unique_ptr` here
|
||||
HeapFree(GetProcessHeap(), 0, unix_path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -873,7 +877,7 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/,
|
||||
}
|
||||
} break;
|
||||
case TYMED_FILE: {
|
||||
const char* unix_path =
|
||||
char* unix_path =
|
||||
wine_get_unix_file_name(storage.lpszFileName);
|
||||
if (unix_path) {
|
||||
std::error_code err;
|
||||
@@ -884,6 +888,8 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/,
|
||||
} else {
|
||||
dragged_files.emplace_back(cannonical_path);
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, unix_path);
|
||||
}
|
||||
} break;
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user