Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 497535 - memory leak within PR_Socket while using PR_OpenTCPSocket
Summary: memory leak within PR_Socket while using PR_OpenTCPSocket
Alias: None
Product: Fedora
Classification: Fedora
Component: nspr
Version: 10
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Kai Engert (:kaie) (inactive account)
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-04-24 14:21 UTC by Kamil Dudka
Modified: 2014-04-04 10:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-04-24 14:37:54 UTC

Attachments (Terms of Use)
minimal example (deleted)
2009-04-24 14:21 UTC, Kamil Dudka
no flags Details

Description Kamil Dudka 2009-04-24 14:21:48 UTC
Created attachment 341177 [details]
minimal example

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

How reproducible:

Steps to Reproduce:
1. run the attached minimal example
Actual results:
[root@xen86 ~]# ./test.c
==4354== Memcheck, a memory error detector.
==4354== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==4354== Using LibVEX rev 1804, a library for dynamic binary translation.
==4354== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==4354== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==4354== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==4354== For more details, rerun with: -v
==4354== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
==4354== malloc/free: in use at exit: 7,864 bytes in 80 blocks.
==4354== malloc/free: 83 allocs, 3 frees, 8,258 bytes allocated.
==4354== For counts of detected errors, rerun with: -v
==4354== searching for pointers to 80 not-freed blocks.
==4354== checked 121,232 bytes.
==4354== 48 bytes in 1 blocks are possibly lost in loss record 8 of 19
==4354==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==4354==    by 0x4C2C4A9: _PR_Getfd (prfdcach.c:141)
==4354==    by 0x4C44004: pt_SetMethods (ptio.c:3319)
==4354==    by 0x4C4527D: PR_Socket (ptio.c:3499)
==4354==    by 0x400634: main (in /root/a.out)
==4354== LEAK SUMMARY:
==4354==    definitely lost: 0 bytes in 0 blocks.
==4354==      possibly lost: 48 bytes in 1 blocks.
==4354==    still reachable: 7,816 bytes in 79 blocks.
==4354==         suppressed: 0 bytes in 0 blocks.
==4354== Reachable blocks (those to which a pointer was found) are not shown.
==4354== To see them, rerun with: --leak-check=full --show-reachable=yes

Additional info:
encountered while investigating Bug 453612

Comment 1 Kamil Dudka 2009-04-24 14:37:54 UTC
Oops, looking once again I can see it's only "possible lost", closing NOTABUG...

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