diff -u -r rampartc-src-1.3.0/src/handlers/rampart_in_handler.c rampartc-src-1.3.0.patched/src/handlers/rampart_in_handler.c --- rampartc-src-1.3.0/src/handlers/rampart_in_handler.c 2009-05-12 22:13:46.000000000 -0700 +++ rampartc-src-1.3.0.patched/src/handlers/rampart_in_handler.c 2009-10-21 15:30:30.532395916 -0700 @@ -144,6 +144,8 @@ "[rampart][rampart_in_handler] Security Header processing failed."); return status; } + + rampart_context_free(rampart_context, env); return AXIS2_SUCCESS; } diff -u -r rampartc-src-1.3.0/src/util/rampart_context.c rampartc-src-1.3.0.patched/src/util/rampart_context.c --- rampartc-src-1.3.0/src/util/rampart_context.c 2009-05-12 22:13:57.000000000 -0700 +++ rampartc-src-1.3.0.patched/src/util/rampart_context.c 2009-10-21 15:31:04.104899188 -0700 @@ -359,11 +359,11 @@ } /* Free receiver certificate we found when processing incoming security header */ - /*if(rampart_context->receiver_cert && rampart_context->found_cert_in_shp) - { + if(rampart_context->receiver_cert && rampart_context->found_cert_in_shp) + { oxs_x509_cert_free(rampart_context->receiver_cert, env); rampart_context->receiver_cert = NULL; - }*/ + } if(rampart_context->key_mgr) { diff -u -r rampartc-src-1.3.0/src/util/rampart_token_processor.c rampartc-src-1.3.0.patched/src/util/rampart_token_processor.c --- rampartc-src-1.3.0/src/util/rampart_token_processor.c 2009-05-12 22:13:57.000000000 -0700 +++ rampartc-src-1.3.0.patched/src/util/rampart_token_processor.c 2009-10-21 15:37:07.076158684 -0700 @@ -113,6 +113,8 @@ if(_cert) { status = AXIS2_SUCCESS; + oxs_x509_cert_copy_to(_cert, env, cert); + oxs_x509_cert_free(_cert, env); } else { @@ -121,8 +123,6 @@ status = AXIS2_FAILURE; } - oxs_x509_cert_copy_to(_cert, env, cert); - oxs_x509_cert_free(_cert, env); _cert = NULL; return status; Only in rampartc-src-1.3.0.patched/src/util: rampart_token_processor.c~