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

Fix memory issues #185

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

stbuehler
Copy link
Contributor

Hi,

another couple of memory related patches.

I think the fix for the "use after free" is the most important one (i think this was the main reason my apt-dater kept crashing, and the reason I started to look into the source).

instead of doing so in all invocations and allocating a new array.
- fixes a memory leak
- prepare for further fixes:
  change TTYMUX_GET_SESSIONS to return list instead of modifying
  HostNode->screens, so it can be used in places that expect
  HostNode->screens not to change
…used by the UI

Still fetch session list, but only use it to check if session is alive;
don't store it.
also use xmlResetLastError instead of xmlResetError, as the latter wants
a non-const pointer, but xmlGetLastError returns a const one.
@stbuehler
Copy link
Contributor Author

Unrelated, but as it seems you're currently preparing a new release:

  • I've still got a meson branch (replacing autotools), and I think the xz incident made it even more clear that moving away from autotools should be done where possible. Given the glib dependency (which requires meson to build itself) you shouldn't loose any platforms by this.
    (The meson branch is currently based on this PR, as this PR makes changes to the buildsystem.)
  • I've got more changes lined up, but most of them use meson, so I can't PR them yet. This includes a github action that automatically tests all configure combinations.
    (You could cherry-pick stbuehler@bd50164 though to silence a warning.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant