You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by ka...@apache.org on 2007/08/21 13:01:32 UTC
svn commit: r568059 - in /webservices/rampart/trunk/c/src: omxmlsec/ctx.c
util/rampart_encryption.c
Author: kaushalye
Date: Tue Aug 21 04:01:27 2007
New Revision: 568059
URL: http://svn.apache.org/viewvc?rev=568059&view=rev
Log:
Fixed memory leak in encryption. Freed the oxs_ctx
Modified:
webservices/rampart/trunk/c/src/omxmlsec/ctx.c
webservices/rampart/trunk/c/src/util/rampart_encryption.c
Modified: webservices/rampart/trunk/c/src/omxmlsec/ctx.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/ctx.c?rev=568059&r1=568058&r2=568059&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/ctx.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/ctx.c Tue Aug 21 04:01:27 2007
@@ -134,11 +134,6 @@
ctx->input_data = NULL;
}
- /*TODO free nodes and key*/
- /*if(ctx->key){
- oxs_key_free(ctx->key, env);
- ctx->key = NULL;
- }*/
AXIS2_FREE(env->allocator, ctx);
ctx = NULL;
Modified: webservices/rampart/trunk/c/src/util/rampart_encryption.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_encryption.c?rev=568059&r1=568058&r2=568059&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_encryption.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_encryption.c Tue Aug 21 04:01:27 2007
@@ -227,8 +227,11 @@
{
return AXIS2_FAILURE;
}
- }
- }
+ }
+ oxs_ctx_free(enc_ctx, env);
+ enc_ctx = NULL;
+
+ }/*Eof For loop*/
/*Get the asymmetric key encryption algorithm*/
enc_asym_algo = rampart_context_get_enc_asym_algo(rampart_context, env);