Menu

(trac issue 2774) memory leak: not detected when struct member is allocated in subfunction

2017-07-14
2017-07-14
  • Alexandru Ardelean

    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

     
  • Alexandru Ardelean

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.