Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

free resume_cmd and idle_cmd at swayidle_finish #93

Merged

Conversation

nikobockerman
Copy link
Contributor

resume_cmd and idle_cmd members of swayidle_timeout_cmd were never freed
even though the strings are allocated by strdup().

resume_cmd and idle_cmd members of swayidle_timeout_cmd were never freed
even though the strings are allocated by strdup().
@@ -103,6 +103,8 @@ static void swayidle_finish() {
wl_list_for_each_safe(cmd, tmp, &state.timeout_cmds, link) {
wl_list_init(&cmd->link);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated: this is broken, it overwrites the previous link. The link is already initialized. We should only call wl_list_remove, not wl_list_init.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #94 to remove that call.

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@emersion emersion merged commit f8a3997 into swaywm:master Feb 4, 2021
@nikobockerman nikobockerman deleted the free-idle-and-resume-commands branch February 4, 2021 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants