diff --git a/src/linux/advanced-scene-switcher-nix.cpp b/src/linux/advanced-scene-switcher-nix.cpp index 750fe32c..e124e5b4 100644 --- a/src/linux/advanced-scene-switcher-nix.cpp +++ b/src/linux/advanced-scene-switcher-nix.cpp @@ -193,10 +193,9 @@ static std::string GetWindowTitle(size_t i) { std::string str(name); windowTitle = str; + XFree(name); } - XFree(name); - return windowTitle; } @@ -262,9 +261,8 @@ void GetCurrentWindowTitle(string &title) if (status != 0 && name != nullptr) { std::string str(name); title = str; + XFree(name); } - - XFree(name); } pair getCursorPos()