Fix two small memory leaks in the camera import dialog#21326
Conversation
|
Reverting to draft until I figure out build failures. My test build must have been using a cached result |
|
@jeffc Your commit contains a part of your feature adding PR code working with a new member of the |
|
That's what I get for trying to quickly split the PR on my lunch break. I fixed the build (removed references to |
|
Ok & nice, squashing all three commits and force_push would be even better :-) |
|
Also, please never merge master branch into a topic branch. The workflow is either to rebase or do nothing if there is no conflicts. |
Done!
Fixed |
These were identified and fixed by AI tools as part of #21319 . Created a separate PR at the request of the reviewers there.
The leak in
camera_control.cwas caused when a caller-allocated list was sorted indt_camctl_import(). When the caller later went tofreethe list, it no longer had access to all of the list elements. Fixed by allocating and later freeing a scope-local shallow copy of the list.The leak in
camera_jobs.cwas caused by a shallow call tofree, which orphaned the underlying dynamically-allocated string data. Fixed by changingg_list_free()tog_list_free_full().