Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • libhandy libhandy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 131
    • Issues 131
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • Librem5
  • libhandylibhandy
  • Merge requests
  • !393

swipe-tracker: Fix a leak in hdy_swipe_tracker_confirm_swipe()

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Adrien Plazas requested to merge adrien.plazas/libhandy:swipe-leak-fix into master Jan 29, 2020
  • Overview 7
  • Commits 2
  • Pipelines 3
  • Changes 1

The swipe tracker takes ownership of the heap-allocated snap points in hdy_swipe_tracker_confirm_swipe(), but if any of the preconditions fail the function would return without freeing that memory. This uses an auto cleanup function to handle these many cases automatically.

This also uses g_clear_pointer() where possible to simplify the code.

CC @exalm

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: swipe-leak-fix