Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 752952 - totemip_parse leaks memory
totemip_parse leaks memory
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openais (Show other bugs)
5.7
All Linux
low Severity low
: rc
: ---
Assigned To: Jan Friesse
Cluster QE
:
Depends On: 752951
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-10 15:29 EST by Steven Dake
Modified: 2016-04-26 12:37 EDT (History)
4 users (show)

See Also:
Fixed In Version: openais-0.80.6-36.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 752951
Environment:
Last Closed: 2012-02-21 00:23:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0180 normal SHIPPED_LIVE openais bug fix and enhancement update 2012-02-20 09:54:52 EST

  None (edit)
Description Steven Dake 2011-11-10 15:29:21 EST
+++ 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 18:11:47 EST
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 18:14:03 EST
Created attachment 533649 [details]
add call to freeaddrinfo()
Comment 7 errata-xmlrpc 2012-02-21 00:23:11 EST
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.