Bug 453091 - netstat (8) memory leak
Summary: netstat (8) memory leak
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: net-tools
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jiri Popelka
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-27 08:01 UTC by masanari iida
Modified: 2010-04-13 08:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-13 08:56:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description masanari iida 2008-06-27 08:01:41 UTC
Description of problem:
netstat(8) seemed to forget to free some blocks,
according to valgrind.

Version-Release number of selected component (if applicable):

# rpm -qf /bin/netstat
net-tools-1.60-73

How reproducible:
Always

Steps to Reproduce:
1. Install Valgrind from Fedora9 src.rpm.
2. Run valgrind --tool=memcheck --leak-check=full netstat

  
Actual results:

==17132==
==17132== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 20 from 1)
==17132== malloc/free: in use at exit: 202,937 bytes in 18,614 blocks.
==17132== malloc/free: 19,522 allocs, 908 frees, 271,451 bytes allocated.
==17132== For counts of detected errors, rerun with: -v
==17132== searching for pointers to 18,614 not-freed blocks.
==17132== checked 308,632 bytes.
==17132==
==17132== 267 (180 direct, 87 indirect) bytes in 15 blocks are definitely lost
in loss record 5 of 9
==17132==    at 0x40054E5: malloc (vg_replace_malloc.c:149)
==17132==    by 0x805237F: (within /bin/netstat)
==17132==    by 0x804B4DF: (within /bin/netstat)
==17132==    by 0x804BA46: (within /bin/netstat)
==17132==    by 0x804F93E: (within /bin/netstat)
==17132==    by 0x35ADEB: (below main) (in /lib/libc-2.5.so)
==17132==
==17132== LEAK SUMMARY:
==17132==    definitely lost: 180 bytes in 15 blocks.  <==
==17132==    indirectly lost: 87 bytes in 15 blocks.
==17132==      possibly lost: 0 bytes in 0 blocks.
==17132==    still reachable: 202,670 bytes in 18,584 blocks.
==17132==         suppressed: 0 bytes in 0 blocks.
==17132== Reachable blocks (those to which a pointer was found) are not shown.
==17132== To see them, rerun with: --leak-check=full --show-reachable=yes


Expected results:
No memory leak.

Additional info:

Comment 1 RHEL Program Management 2009-11-06 19:04:30 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".


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