Bug 246255 - memory leak in librpm
memory leak in librpm
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-29 12:41 EDT by Andrew
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-04 09:23:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew 2007-06-29 12:41:20 EDT
Description of problem:
Memory leak in librpm occurs after rpmReadConfigFiles(NULL, NULL) call.

Version-Release number of selected component (if applicable):
$ rpm -q rpm
rpm-4.4.2-39

How reproducible:
always

Steps to Reproduce:
1. just call rpmReadConfigFiles(NULL, NULL); in your program
2. compile it with debug info
3. run valgrind --leak-check=full ./your_program
  
Actual results:
==27880== 49 bytes in 2 blocks are definitely lost in loss record 9 of 34
==27880==    at 0x1B904812: malloc (vg_replace_malloc.c:149)
==27880==    by 0x1BB16656: rpmGlob (in /usr/lib/librpmio-4.4.so)
==27880==    by 0x1BB1A0E1: rpmInitMacros (in /usr/lib/librpmio-4.4.so)
==27880==    by 0x1B9867BC: rpmReadConfigFiles (in /usr/lib/librpm-4.4.so)
==27880==    by 0x804A81C: main (symbol_lookup.c:266)
==27880==
==27880==
==27880== 123 bytes in 5 blocks are definitely lost in loss record 12 of 34
==27880==    at 0x1B904812: malloc (vg_replace_malloc.c:149)
==27880==    by 0x1BB16879: rpmGlob (in /usr/lib/librpmio-4.4.so)
==27880==    by 0x1BB1A0E1: rpmInitMacros (in /usr/lib/librpmio-4.4.so)
==27880==    by 0x1B9867BC: rpmReadConfigFiles (in /usr/lib/librpm-4.4.so)
==27880==    by 0x804A81C: main (symbol_lookup.c:266)
==27880==
==27880==
==27880== 258 bytes in 2 blocks are definitely lost in loss record 13 of 34
==27880==    at 0x1B904812: malloc (vg_replace_malloc.c:149)
==27880==    by 0x1B984E82: (within /usr/lib/librpm-4.4.so)
==27880==    by 0x1B9858D4: (within /usr/lib/librpm-4.4.so)
==27880==    by 0x1B986750: rpmReadConfigFiles (in /usr/lib/librpm-4.4.so)
==27880==    by 0x804A81C: main (symbol_lookup.c:266)
==27880==
==27880== LEAK SUMMARY:
==27880==    definitely lost: 430 bytes in 9 blocks.
==27880==      possibly lost: 0 bytes in 0 blocks.
==27880==    still reachable: 70299 bytes in 2945 blocks.
==27880==         suppressed: 0 bytes in 0 blocks.

Expected results:
There should be no memory leak.
Comment 2 Panu Matilainen 2007-07-02 08:04:27 EDT
Yup, fixed in rpm.org tree (was already fixed in rpm5.org), will be in 4.4.2.1.
Comment 3 Panu Matilainen 2007-07-04 09:23:13 EDT
Will be fixed in next rawhide push.

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