Return-Path: Delivered-To: apmail-axis-c-dev-archive@www.apache.org Received: (qmail 67559 invoked from network); 12 Jul 2010 09:30:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Jul 2010 09:30:48 -0000 Received: (qmail 10214 invoked by uid 500); 12 Jul 2010 09:30:48 -0000 Delivered-To: apmail-axis-c-dev-archive@axis.apache.org Received: (qmail 10003 invoked by uid 500); 12 Jul 2010 09:30:47 -0000 Mailing-List: contact c-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list c-dev@axis.apache.org Received: (qmail 9940 invoked by uid 99); 12 Jul 2010 09:30:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 09:30:44 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 09:30:41 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6C9MoaR004597 for ; Mon, 12 Jul 2010 09:22:50 GMT Message-ID: <9371688.322601278926570383.JavaMail.jira@thor> Date: Mon, 12 Jul 2010 05:22:50 -0400 (EDT) From: "Mirko Wischer (JIRA)" To: c-dev@axis.apache.org Subject: [jira] Commented: (AXIS2C-1486) ADB generated code generates memory leak In-Reply-To: <6893644.322481278926330656.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2C-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887322#action_12887322 ] Mirko Wischer commented on AXIS2C-1486: --------------------------------------- I first added this issue to AXIS2 ADB component but this was wrong (see AXIS2-4225) > ADB generated code generates memory leak > ---------------------------------------- > > Key: AXIS2C-1486 > URL: https://issues.apache.org/jira/browse/AXIS2C-1486 > Project: Axis2-C > Issue Type: Bug > Components: code generation > Affects Versions: 1.4.1 > Environment: Win32 > Reporter: Mirko Wischer > Attachments: CADBBeanTemplateSource_trunk.xsl.diff > > > The xslt used for transforming to C Code (CADBBeanTemplateSource.xsl) creates a memory leak: > Code created for adb_..._serialize(..) contains a memory leak for the following types: > - axutil_date_time_t > - axutil_base64_binary_t > The XSLT uses axutil_base64_binary_get_encoded_binary() and axutil_date_time_serialize_date_time() for creating > textual representations. After writing these texts to the stream the start and end tags are freed but the > the generated code never releases the base64 text or data_time text: > Look at the follown snippet from the trunk version of the XSLT: > (starting at Line: 4435) > > text_value_ = axutil_date_time_serialize_date_time(, env); > > axutil_stream_write(stream, env, start_input_str, start_input_str_len); > > axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_)); > ---> MISSING FREE AT THIS POSITION: AXIS2_FREE(env->allocator, text_value_); > > axutil_stream_write(stream, env, end_input_str, end_input_str_len); > > > And starting at line: 4446 > > text_value_ =axutil_base64_binary_get_encoded_binary(, env); > > axutil_stream_write(stream, env, start_input_str, start_input_str_len); > > axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_)); ----> MISSING FREE HERE: AXIS2_FREE(env->allocator, text_value_); > > axutil_stream_write(stream, env, end_input_str, end_input_str_len); > > > Patch for trunk is included as DIFF file ( this also contains a fix for compiling with Visual Studio C Compiler) -- 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: c-dev-unsubscribe@axis.apache.org For additional commands, e-mail: c-dev-help@axis.apache.org