Skip to content

Commit c62e46d

Browse files
committed
posix.cfg: Report memory leak when memory is allocated with getaddrinfo() and it is not freeded with freeaddrinfo().
1 parent 1c2339a commit c62e46d

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

cfg/posix.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
16261626
<not-uninit/>
16271627
</arg>
16281628
</function>
1629+
<!-- http://pubs.opengroup.org/onlinepubs/009695399/functions/freeaddrinfo.html -->
16291630
<!-- void freeaddrinfo(struct addrinfo *ai); -->
16301631
<function name="freeaddrinfo">
16311632
<noreturn>false</noreturn>
@@ -1635,6 +1636,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
16351636
<!-- not-null is not required by the resource above, but some systems will segfault -->
16361637
</arg>
16371638
</function>
1639+
<!-- http://pubs.opengroup.org/onlinepubs/009695399/functions/freeaddrinfo.html -->
16381640
<!-- int getaddrinfo(const char * nodename, const char * servname, const struct addrinfo * hints, struct addrinfo ** res); -->
16391641
<function name="getaddrinfo">
16401642
<noreturn>false</noreturn>
@@ -3248,6 +3250,10 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
32483250
<alloc init="true">mq_open</alloc>
32493251
<dealloc>mq_close</dealloc>
32503252
</resource>
3253+
<memory>
3254+
<alloc init="true" arg="3">getaddrinfo</alloc>
3255+
<dealloc>freeaddrinfo</dealloc>
3256+
</memory>
32513257
<!-- This type definitions refer to http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html-->
32523258
<podtype name="in_port_t" sign="u" size="2"/>
32533259
<podtype name="in_addr_t" sign="u" size="4"/>

cfg/wxwidgets.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<define name="wxTRANSLATE" value=""/>
1515
<!-- http://docs.wxwidgets.org/trunk/group__group__funcmacro__string.html#ga8a02b8875a521df57263a9e6f090f2d0 -->
1616
<!-- #define _(string) -->
17-
<define name="_" value=""/>
17+
<define name="_" value=""/>
1818
<!-- http://docs.wxwidgets.org/trunk/classwx_string.html#addd9ccfa3ae2b7ab2d66bcbf034d0be0 -->
1919
<!-- static wxString wxString::Format(const wxString & format, ...) -->
2020
<function name="wxString::Format">
@@ -30,7 +30,7 @@
3030
</arg>
3131
</function>
3232
<!-- http://docs.wxwidgets.org/trunk/classwx_string.html#a9588b7f2684b9a6a924dc3746a2b2f8d -->
33-
<!-- int wxString::Printf(const wxString & format, ...) -->
33+
<!-- int wxString::Printf(const wxString & format, ...) -->
3434
<function name="wxString::Printf">
3535
<noreturn>false</noreturn>
3636
<leak-ignore/>

0 commit comments

Comments
 (0)