[ 
https://issues.apache.org/jira/browse/AXISCPP-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

nadir amra closed AXISCPP-922.
------------------------------

       Resolution: Fixed
    Fix Version/s: current (nightly)

> Resource leak in AttachmentHelper::extract_Attachment
> -----------------------------------------------------
>
>                 Key: AXISCPP-922
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-922
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Server - Deserialization
>    Affects Versions:  1.6 Final
>         Environment: All platforms, this issue was found in nightly drop 
> 24-Jan-2006 21:23 
>            Reporter: Emanuel Norrbin
>             Fix For: current (nightly)
>
>
> File: server\apache2\AttachmentHelper.cpp
> Method: void AttachmentHelper::extract_Attachment(char *pBuffer)
> Line: 88 - 89
> This is a very easy bug to spot and fix:
>             xsd__base64Binary*  base64_attachment = new xsd__base64Binary();
>             base64_attachment = AxisUtils::decodeFromBase64Binary(attach);    
>         
> In Java this code would be fine but in C++ is is a resource leak,
> the first new is not needed since decodeFromBase64Binary will allocate the 
> xsd__base64Binary.
> I suggest replacing the two lines with this one:
> xsd__base64Binary*  base64_attachment = 
> AxisUtils::decodeFromBase64Binary(attach);
> /Emanuel

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to