Bug 741641

Summary: Memory leak in xmlrpc-c version 1.16.24
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: xmlrpc-cAssignee: Vojtech Vitek <vvitek>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: dpal, hripps, jgalipea, ksiddiqu, michele.dibenedetto, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 735835 Environment:
Last Closed: 2012-06-20 14:47:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 735835    
Bug Blocks: 756082    

Description Dmitri Pal 2011-09-27 13:44:34 UTC
+++ This bug was initially created as a clone of Bug #735835 +++

Description of problem:
xmlrpc-c library version 1.16.24 has a memory leak.
This leak is evident running a simpe XML-RPC client under valgrind 

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

How reproducible:
Writing a simple XML-RPC client and server with a method having as parameters an array of structres start the server and perform an xmlrpc call with the client under valgrind. valgrind will report the memory leakage of the library.

Steps to Reproduce:
1.Write an xmlrpc server with a method having as parameters an array of structures
2.Write an xmlrpc client using xmlrpc-c-client calling the defined method
3.Execute the client under valgrind with --leak-check=yes option
4.Inspect valgrind output
  
Actual results:
valgrind will report the loss of memory allocated by xmlrpc_createXmlrpcValue function. Here is a sample output

==11383== 1,512 (96 direct, 1,416 indirect) bytes in 2 blocks are definitely lost in loss record 1,916 of 2,075
==11383==    at 0x4A0646F: malloc (vg_replace_malloc.c:236)
==11383==    by 0x4C1C142: xmlrpc_createXmlrpcValue (xmlrpc_data.c:320)
==11383==    by 0x4C1EB71: xmlrpc_array_new (xmlrpc_array.c:191)
==11383==    by 0x4C1FAAD: getValue (xmlrpc_build.c:109)
==11383==    by 0x4C2010E: xmlrpc_build_value_va (xmlrpc_build.c:376)
==11383==    by 0x38ED2041BD: xmlrpc_client_call_asynch (in /usr/lib64/libxmlrpc_client.so.3.16)

Expected results:
valgrind does not report any memory leakage

Additional info:
Performing this test with last stable xmlrpc-c version 1.25.10 does not shows the memory leak

Comment 11 errata-xmlrpc 2012-06-20 14:47:42 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-2012-0954.html