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"/>