Bug 752952 - totemip_parse leaks memory
Summary: totemip_parse leaks memory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openais
Version: 5.7
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jan Friesse
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 752951
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-10 20:29 UTC by Steven Dake
Modified: 2016-04-26 16:37 UTC (History)
4 users (show)

Fixed In Version: openais-0.80.6-36.el5
Doc Type: Bug Fix
Doc Text:
Clone Of: 752951
Environment:
Last Closed: 2012-02-21 05:23:11 UTC
Target Upstream Version:


Attachments (Terms of Use)
add call to freeaddrinfo() (296 bytes, patch)
2011-11-14 23:14 UTC, Angus Salkeld
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0180 0 normal SHIPPED_LIVE openais bug fix and enhancement update 2012-02-20 14:54:52 UTC

Description Steven Dake 2011-11-10 20:29:21 UTC
+++ This bug was initially created as a clone of Bug #752951 +++

Description of problem:
totemip_parse uses getaddrinfo without using an associated freeaddrinfo call.

Version-Release number of selected component (if applicable):
corosync-1.4.1-1.el6

How reproducible:
requires valgrind analysis

Steps to Reproduce:
1.
2.
3.
  
Actual results:
some minimal amount of memory will be leaked when this api is called.  This function is not called often, but is called enough that over several months it could add up.

Expected results:
no leaks with getaddrinfo.

Additional info:
[corosync] [PATCH 1/7] Free mem allocated by getaddrinfo

Comment 2 Angus Salkeld 2011-11-14 23:11:47 UTC
Here is the valgrind snippet

sudo valgrind --leak-check=full /usr/local/sbin/aisexec -f

[snip]

==15126== 64 bytes in 1 blocks are definitely lost in loss record 16 of 42
==15126==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==15126==    by 0x39BCCD8793: gaih_inet (in /lib64/libc-2.14.90.so)
==15126==    by 0x39BCCDBBCD: getaddrinfo (in /lib64/libc-2.14.90.so)
==15126==    by 0x40790D: totemip_parse (in /usr/local/sbin/aisexec)
==15126==    by 0x41FC8E: totem_config_read (in /usr/local/sbin/aisexec)
==15126==    by 0x405CD1: main (in /usr/local/sbin/aisexec)

Comment 3 Angus Salkeld 2011-11-14 23:14:03 UTC
Created attachment 533649 [details]
add call to freeaddrinfo()

Comment 7 errata-xmlrpc 2012-02-21 05:23:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0180.html


Note You need to log in before you can comment on or make changes to this bug.