Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 88658 invoked from network); 2 Oct 2008 14:04:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Oct 2008 14:04:35 -0000 Received: (qmail 39169 invoked by uid 500); 2 Oct 2008 14:04:33 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 39155 invoked by uid 500); 2 Oct 2008 14:04:33 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 39144 invoked by uid 99); 2 Oct 2008 14:04:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2008 07:04:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2008 14:03:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4353E234C20F for ; Thu, 2 Oct 2008 07:03:44 -0700 (PDT) Message-ID: <667512814.1222956224274.JavaMail.jira@brutus> Date: Thu, 2 Oct 2008 07:03:44 -0700 (PDT) From: "nadir amra (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Closed: (AXISCPP-1055) Memory Leak in SoapSerializer::addOutputParam() In-Reply-To: <1440360351.1222891304449.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXISCPP-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] nadir amra closed AXISCPP-1055. ------------------------------- Resolution: Invalid xsdValue is passed to Param object using: pParam->setValue(type, xsdValue); The xsdValue is then owned by the Param object, which deletes the object when Param destructor is invoked. > Memory Leak in SoapSerializer::addOutputParam() > ----------------------------------------------- > > Key: AXISCPP-1055 > URL: https://issues.apache.org/jira/browse/AXISCPP-1055 > Project: Axis-C++ > Issue Type: Bug > Components: Serialization > Environment: Windows XP, VS6 with Compuware BoundsChecker > Reporter: Ryan McCullough > Fix For: current (nightly) > > > The function: > int SoapSerializer::addOutputParam( const AxisChar * pchName, void * pValue, XSDTYPE type) > contains a memory leak. xsdValue is not being deleted. Here is our proposed change: > /* > * Basic output parameter going to be serialized as an Element later > */ > int SoapSerializer:: > addOutputParam( const AxisChar * pchName, void * pValue, XSDTYPE type) > { > IAnySimpleType* xsdValue = AxisUtils::createSimpleTypeObject(pValue, type); > > Param * pParam = new Param(); > if( !pParam) > return AXIS_FAIL; > pParam->m_Type = type; > pParam->m_sName = pchName; > pParam->setValue(type, xsdValue); > > if( m_pSoapEnvelope && > (m_pSoapEnvelope->m_pSoapBody) && > (m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod)) > m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod->addOutputParam( pParam); > else > { > delete xsdValue; > delete pParam; > return AXIS_FAIL; > } > delete xsdValue; > return AXIS_SUCCESS; // Can it only be successful? > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org