Merge pull request #4183 from Talbrelliles/custom-module-memory-fix
Memory Fix for continuous scripts in custom module
This commit is contained in:
@ -62,7 +62,7 @@ void waybar::modules::Custom::continuousWorker() {
|
|||||||
}
|
}
|
||||||
thread_ = [this, cmd] {
|
thread_ = [this, cmd] {
|
||||||
char* buff = nullptr;
|
char* buff = nullptr;
|
||||||
waybar::util::ScopeGuard buff_deleter([buff]() {
|
waybar::util::ScopeGuard buff_deleter([&buff]() {
|
||||||
if (buff) {
|
if (buff) {
|
||||||
free(buff);
|
free(buff);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user