On Tue, Sep 11, 2012 at 4:05 PM, Roland Osborne
<[email protected]> wrote:
> Signed-off-by: [email protected]
>
> I saw a memory leak in the TPM engine when doing many OpenSSL connections.
> This change resolved the issue for me:

Applied, I added a check for hEncData, which could need closing as well.

Thanks,
Kent

> Index: src/e_tpm.c
> ===================================================================
> --- src/e_tpm.c (revision 18949)
> +++ src/e_tpm.c (working copy)
> @@ -850,6 +850,18 @@
>
>         DBG("%s", __FUNCTION__);
>
> +    if(app_data != NULL && app_data->hHash != NULL_HHASH)
> +    {
> +        p_tspi_Context_CloseObject(hContext, app_data->hHash);
> +        app_data->hHash = NULL_HHASH;
> +    }
> +
> +    if(app_data != NULL && app_data->hKey != NULL_HKEY)
> +    {
> +        p_tspi_Context_CloseObject(hContext, app_data->hKey);
> +        app_data->hKey = NULL_HKEY;
> +    }
> +
>         OPENSSL_free(app_data);
>
>         return 1;
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> TrouSerS-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/trousers-tech
>



-- 
IBM LTC Security

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech

Reply via email to