richard-uk1 / alpm

ffi for alpm in rust
Apache License 2.0
11 stars 5 forks source link

fix memory leak in Db.search #4

Closed guinux closed 7 years ago

guinux commented 7 years ago

You have a memory leak because the returned alpm_list must be freed. This is an exception, this function returns a newly created list with the alpm_package matching the search. Those alpm_package(s) must not be freed.

richard-uk1 commented 7 years ago

Thanks!

I've struggled to understand exactly who has ownershipin different places in libalpm.

guinux commented 7 years ago

No problem, I'm the dev of Pamac so I wrote vala alpm bindings and I have a good knowledge of alpm. I'm discovering rust but I can help you if you want. Do you write this bindings with a particular project in mind?

richard-uk1 commented 7 years ago

Help would be very much appreciated! I wrote this lib just for my own scripting. It's not too far from complete, but the bit I haven't done is transactions, as I've not yet invested the time in understanding them. If you need any info on parts of the code feel free to ask! I'll try to make a list of the missing functionality.