Bug 735650 - memory leak on virNetTLSContextCheckCertificate and testTLSSessionInit
Summary: memory leak on virNetTLSContextCheckCertificate and testTLSSessionInit
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-09-04 15:31 UTC by Alex Jia
Modified: 2011-12-06 11:28 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.9.4-11.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:28:24 UTC
Target Upstream Version:


Attachments (Terms of Use)
virnettlscontexttest-by-valgrind.log (65.77 KB, text/plain)
2011-09-04 15:33 UTC, Alex Jia
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Alex Jia 2011-09-04 15:31:07 UTC
Description of problem:
There are memory leaks on the following files and functions:

* tests/virnettlscontexttest.c: static int testTLSSessionInit(const void 
  opaque)

* src/rpc/virnettlscontext.c: static int   
  virNetTLSContextValidCertificate(virNetTLSContextPtr ctxt,
                                   virNetTLSSessionPtr sess)
                                

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

How reproducible:
Always.


Steps to Reproduce:
1. cd libvirt
2. ./configure && make && make -C tests valgrind
or
./configure && make && make check tests
valgrind -v --leak-check=full ./tests/virnettlscontexttest
  
Actual results:
==22620==
==22620== LEAK SUMMARY:
==22620==    definitely lost: 90,304 bytes in 64 blocks
==22620==    indirectly lost: 342,671 bytes in 4,994 blocks
==22620==      possibly lost: 0 bytes in 0 blocks
==22620==    still reachable: 136,728 bytes in 1,449 blocks
==22620==         suppressed: 0 bytes in 0 blocks

Expected results:
Fix memory leaks.

Additional info:
please see attachment.

Comment 1 Alex Jia 2011-09-04 15:33:35 UTC
Created attachment 521379 [details]
virnettlscontexttest-by-valgrind.log

Comment 3 Alex Jia 2011-09-08 10:25:50 UTC
Patches have been pushed, Osier, you may move the bug to POST status.

commit db8ffc2dfb0c21eeb179f689252d72b17dea0b94
Author: Alex Jia <ajia@redhat.com>
Date:   Sun Sep 4 23:48:42 2011 +0800

    rpc: avoid memory leak on virNetTLSContextValidCertificate
    
    * src/rpc/virnettlscontext.c: fix memory leak on
      virNetTLSContextValidCertificate.
    

commit 3a89819de81661d1b2058b7bbc21e1d54ed67edf
Author: Alex Jia <ajia@redhat.com>
Date:   Sun Sep 4 23:48:41 2011 +0800

    tests: avoid memory leak on testTLSSessionInit
    
    * tests/virnettlscontexttest: fix memory leak on virnettlscontext test case.

Comment 8 errata-xmlrpc 2011-12-06 11:28:24 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-2011-1513.html


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