small memory leak fix #225

Merged
annacrombie merged 3 commits from master into master 2021-07-24 11:08:25 +00:00
annacrombie commented 2021-06-11 06:09:34 +00:00 (Migrated from github.com)

Hello, I was using integrating libpkgconf into my project and noticed some memory wasn't being cleaned up with the help of valgrind. I was already suspicious that there was no _deinit function for personality, so it was pretty easy to track down. I'm not entirely sure this is the correct fix, because I haven't been able to determine if personality owns these resources, or if client is supposed to. If the latter is the case, let me know and I will move my clean up code to the client deinit function.

I also added some code to close error_msgout if it got opened, because that was making valgrind upset too.

Since the memory was still referenced, this is not that big of an issue, but I thought I might as well make a PR.

Hello, I was using integrating `libpkgconf` into my project and noticed some memory wasn't being cleaned up with the help of valgrind. I was already suspicious that there was no `_deinit` function for personality, so it was pretty easy to track down. I'm not entirely sure this is the correct fix, because I haven't been able to determine if personality owns these resources, or if client is supposed to. If the latter is the case, let me know and I will move my clean up code to the client deinit function. I also added some code to close `error_msgout` if it got opened, because that was making valgrind upset too. Since the memory was still referenced, this is not that big of an issue, but I thought I might as well make a PR.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#225
There is no content yet.