Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
A
at-spi2-core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • at-spi2-core
  • Issues
  • #31

Closed
Open
Opened Feb 23, 2021 by Bartłomiej Grzelewski@grzelewskiContributor

Memory leak in Atspi Device Listener CB support

It seems that during callback call we there is memory leak. I believe that problem is here:

File: atspi-device-listener.c

Function: atspi_device_event_dispatch

Line: if ((handled = eh->callback(atspi_device_event_copy(event), eh->user_data)))

As you can see the callback gets pointer to copy of the event. In the API description you can find that first parameter is const* - so you should not free this memory ( https://developer.gnome.org/libatspi/stable/AtspiDeviceListener.html#AtspiDeviceListenerCB ). As the result memory returned by atspi_device_event_copy(event) is lost.

I'm not sure there is the problem. Should it be fixed in api description or in at-spi-core code?

The "Transfer full" connected with first parameter suggest that the bug is in the description ( the const should be removed ).

Edited Feb 23, 2021 by Bartłomiej Grzelewski
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/at-spi2-core#31