I wanted to reply on that trac ticket, but comments seems disabled [or I'm an idiot ; both seem valid assumptions sometimes].
I wanted to do this internally for a library that allocs memory and free's it via another function.
So, I tried to look at getaddrinfo().
But it does not seem to have a check to mak sure freeaddrinfo() is called.
I was wondering if the <memory> alloc/dealloc thingi would work, but it doesn't.
It makes sense tho, because you need to specify which arg allocs stuff.
Any thoughts on when this would be done, or how ?
Or plans/updates ?
Maybe I missed something while searching for this.
Thanks
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Trac ticket: http://trac.cppcheck.net/ticket/2774
I wanted to reply on that trac ticket, but comments seems disabled [or I'm an idiot ; both seem valid assumptions sometimes].
I wanted to do this internally for a library that allocs memory and free's it via another function.
So, I tried to look at
getaddrinfo()
.But it does not seem to have a check to mak sure
freeaddrinfo()
is called.I was wondering if the
<memory>
alloc/dealloc thingi would work, but it doesn't.It makes sense tho, because you need to specify which arg allocs stuff.
Any thoughts on when this would be done, or how ?
Or plans/updates ?
Maybe I missed something while searching for this.
Thanks
Alex
Thanks for reporting. I pushed a potential fix for getaddrinfo()/freeaddrinfo() handling with https://github.com/danmar/cppcheck/commit/c62e46dc6ed452286943c402b8e2ab67ebaefda3.
Could you give it a try?
Thanks.
Will give it a try.
Seems it was merged in the meantime.
That at least helps me write definitions for other functions :)
I would have replied earlier,but I think I need to enable some email notifications.