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 ma...@apache.org on 2007/08/20 11:37:04 UTC

svn commit: r567628 - in /webservices/rampart/trunk/c/src/omxmlsec: axiom.c key_mgr.c

Author: manjula
Date: Mon Aug 20 02:37:03 2007
New Revision: 567628

URL: http://svn.apache.org/viewvc?rev=567628&view=rev
Log:
Fixing Memory leaks.

Modified:
    webservices/rampart/trunk/c/src/omxmlsec/axiom.c
    webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c

Modified: webservices/rampart/trunk/c/src/omxmlsec/axiom.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/axiom.c?rev=567628&r1=567627&r2=567628&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/axiom.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/axiom.c Mon Aug 20 02:37:03 2007
@@ -233,6 +233,8 @@
             }
             if(0 == axutil_strcmp(local_name, this_attr_name) && 0 == axutil_strcmp(ns_uri, this_attr_ns_uri)){
                 /*Got it !!!*/
+                axutil_hash_free(attr_list, env);
+                attr_list = NULL;
                 return axiom_attribute_get_value(om_attr, env);
             }
         }

Modified: webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c?rev=567628&r1=567627&r2=567628&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c Mon Aug 20 02:37:03 2007
@@ -146,6 +146,10 @@
         oxs_x509_cert_set_public_key(oxs_cert, env, open_pubkey);
         /*Set the x509 certificate to the asym ctx*/
         oxs_asym_ctx_set_certificate(ctx, env, oxs_cert);
+
+        X509_free(cert);
+        cert = NULL;
+
     }
     /*If this fails to get anything return failure*/
     if((!cert) && (!pubkey) && (!prvkey)){