axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrik Nordberg (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Updated: (AXISCPP-919) Double delete in generated DestroyInstance()
Date Thu, 02 Feb 2006 23:20:04 GMT
     [ http://issues.apache.org/jira/browse/AXISCPP-919?page=all ]

Henrik Nordberg updated AXISCPP-919:
------------------------------------

    Attachment: diff.txt

A diff that removes the line

            writer.write("\t\tdelete inst;\n");

from ws-axis\c\src\wsdl\org\apache\axis\wsdl\wsdl2ws\cpp\ClassLoader.java

> Double delete in generated DestroyInstance()
> --------------------------------------------
>
>          Key: AXISCPP-919
>          URL: http://issues.apache.org/jira/browse/AXISCPP-919
>      Project: Axis-C++
>         Type: Bug
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg
>     Priority: Critical
>  Attachments: diff.txt
>
> The generated code for each web service has this function:
> STORAGE_CLASS_INFO 
> int DestroyInstance(BasicHandler *inst)
> {
> 	if (inst)
> 	{
> 		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
> 		pWCH->fini();
> 		delete pWCH;		
> 		delete inst;
> 		return AXIS_SUCCESS;
> 	}
> 	return AXIS_FAIL;
> }
> The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*,
as suggested by the reinterpret_cast<>, then the
> delete inst;
> call should be removed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message