posix.cfg: Report memory leak when memory is allocated with getaddrinfo() and it is not freeded with freeaddrinfo().

This commit is contained in:
orbitcowboy 2017-07-17 15:17:20 +02:00
parent 1c2339ae1d
commit c62e46dc6e
2 changed files with 8 additions and 2 deletions

View File

@ -1626,6 +1626,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- http://pubs.opengroup.org/onlinepubs/009695399/functions/freeaddrinfo.html -->
<!-- void freeaddrinfo(struct addrinfo *ai); -->
<function name="freeaddrinfo">
<noreturn>false</noreturn>
@ -1635,6 +1636,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<!-- not-null is not required by the resource above, but some systems will segfault -->
</arg>
</function>
<!-- http://pubs.opengroup.org/onlinepubs/009695399/functions/freeaddrinfo.html -->
<!-- int getaddrinfo(const char * nodename, const char * servname, const struct addrinfo * hints, struct addrinfo ** res); -->
<function name="getaddrinfo">
<noreturn>false</noreturn>
@ -3248,6 +3250,10 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<alloc init="true">mq_open</alloc>
<dealloc>mq_close</dealloc>
</resource>
<memory>
<alloc init="true" arg="3">getaddrinfo</alloc>
<dealloc>freeaddrinfo</dealloc>
</memory>
<!-- This type definitions refer to http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html-->
<podtype name="in_port_t" sign="u" size="2"/>
<podtype name="in_addr_t" sign="u" size="4"/>

View File

@ -14,7 +14,7 @@
<define name="wxTRANSLATE" value=""/>
<!-- http://docs.wxwidgets.org/trunk/group__group__funcmacro__string.html#ga8a02b8875a521df57263a9e6f090f2d0 -->
<!-- #define _(string) -->
<define name="_" value=""/>
<define name="_" value=""/>
<!-- http://docs.wxwidgets.org/trunk/classwx_string.html#addd9ccfa3ae2b7ab2d66bcbf034d0be0 -->
<!-- static wxString wxString::Format(const wxString & format, ...) -->
<function name="wxString::Format">
@ -30,7 +30,7 @@
</arg>
</function>
<!-- http://docs.wxwidgets.org/trunk/classwx_string.html#a9588b7f2684b9a6a924dc3746a2b2f8d -->
<!-- int wxString::Printf(const wxString & format, ...) -->
<!-- int wxString::Printf(const wxString & format, ...) -->
<function name="wxString::Printf">
<noreturn>false</noreturn>
<leak-ignore/>