Skip to content

Fix memory issues#185

Open
stbuehler wants to merge 7 commits into
DE-IBH:masterfrom
stbuehler:fix-memory-issues
Open

Fix memory issues#185
stbuehler wants to merge 7 commits into
DE-IBH:masterfrom
stbuehler:fix-memory-issues

Conversation

@stbuehler

Copy link
Copy Markdown
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
Copy Markdown
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