Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • mutter mutter
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,152
    • Issues 1,152
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 120
    • Merge requests 120
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • muttermutter
  • Merge requests
  • !2805

wayland/transaction: Don't free queue node on tear down

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jonas Ådahl requested to merge jadahl/mutter:wip/fix-transactions-tear-down into main Jan 25, 2023
  • Overview 4
  • Commits 1
  • Pipelines 5
  • Changes 1

The GQueue node for transactions are inlined in the transaction struct, meaning we should never let the GQueue API free the node itself, as that actuall frees the transaction itself.

We did this during tear down if there were left-over transactions, meaning we ended up with use-after-free issues after having popped transactions from the queue.

Fix this by just popping the link itself, which won't attempt to free it. It is effectively freed when freeing the transaction itself so we won't leak any memory.

Fixes: 56260e3e

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/fix-transactions-tear-down