ws-rampart-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kausha...@apache.org
Subject svn commit: r572349 - in /webservices/rampart/trunk/c: include/ samples/secpolicy/ src/omxmlsec/ src/omxmlsec/tokens/ src/util/
Date Mon, 03 Sep 2007 14:26:57 GMT
Author: kaushalye
Date: Mon Sep  3 07:26:56 2007
New Revision: 572349

URL: http://svn.apache.org/viewvc?rev=572349&view=rev
Log:
Memory leak fixes and code cleanings

Modified:
    webservices/rampart/trunk/c/include/oxs_axiom.h
    webservices/rampart/trunk/c/include/rampart_util.h
    webservices/rampart/trunk/c/samples/secpolicy/run_all.sh
    webservices/rampart/trunk/c/src/omxmlsec/tokens/token_reference_list.c
    webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c
    webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c
    webservices/rampart/trunk/c/src/util/rampart_username_token.c

Modified: webservices/rampart/trunk/c/include/oxs_axiom.h
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/oxs_axiom.h?rev=572349&r1=572348&r2=572349&view=diff
==============================================================================
--- webservices/rampart/trunk/c/include/oxs_axiom.h (original)
+++ webservices/rampart/trunk/c/include/oxs_axiom.h Mon Sep  3 07:26:56 2007
@@ -124,7 +124,10 @@
                                            axis2_char_t* local_name,
                                            axis2_char_t* ns_uri,
                                            axis2_char_t* prefix);
-
+    /*
+     * Returns content of a node
+     * 
+     */
     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
     oxs_axiom_get_node_content(const axutil_env_t *env, axiom_node_t* node);
 

Modified: webservices/rampart/trunk/c/include/rampart_util.h
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/rampart_util.h?rev=572349&r1=572348&r2=572349&view=diff
==============================================================================
--- webservices/rampart/trunk/c/include/rampart_util.h (original)
+++ webservices/rampart/trunk/c/include/rampart_util.h Mon Sep  3 07:26:56 2007
@@ -44,6 +44,7 @@
 
     /**
      * Load a DLL or .SO module
+     * User MUST free memory
      * @param env pointer to environment struct
      * @param module_name name of the module to be loaded
      * @return the loaded module
@@ -55,6 +56,7 @@
 
     /**
      * Load the credentials module
+     * User MUST free memory
      * @param env pointer to environment struct
      * @param cred_module_name name of the credentails module to be loaded
      * @return the loaded credentails module
@@ -65,6 +67,7 @@
 
     /**
      * Call credentials module
+     * User MUST free memory
      * @param env pointer to environment struct
      * @param cred_module the credentails module
      * @param ctx the message context
@@ -81,6 +84,7 @@
 
     /**
      * Load authentication module
+     * User MUST free memory
      * @param env pointer to environment struct
      * @param auth_module_name name of the authentication module
      * @return creatd athenticaiton module
@@ -112,6 +116,7 @@
 
     /**
      * Load the password callback module
+     * User MUST free memory
      * @param env pointer to environment struct
      * @callback_module_name the name of the callback module
      * @return the loaded callback module
@@ -133,18 +138,20 @@
                               const axis2_char_t *username);
 
     /**
-      * Generates the nonce. Nonce is a base64 encoded random string.
-      * @param env pointer to environment struct
-      * @return generated nonce
-      */
+     * Generates the nonce. Nonce is a base64 encoded random string.
+     * User MUST free memory
+     * @param env pointer to environment struct
+     * @return generated nonce
+     */
     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
     rampart_generate_nonce(const axutil_env_t *env);
 
     /**
-      * Generates the nonce. Nonce is a base64 encoded random string.
-      * @param ttl Time to live. The time difference between created and expired in mili
seconds.
-      * @return generated nonce
-      **/
+     * Generates the nonce. Nonce is a base64 encoded random string.
+     * User MUST free memory
+     * @param ttl Time to live. The time difference between created and expired in mili seconds.
+     * @return generated nonce
+     **/
     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
     rampart_generate_time(const axutil_env_t *env, int ttl);
 

Modified: webservices/rampart/trunk/c/samples/secpolicy/run_all.sh
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/secpolicy/run_all.sh?rev=572349&r1=572348&r2=572349&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/secpolicy/run_all.sh (original)
+++ webservices/rampart/trunk/c/samples/secpolicy/run_all.sh Mon Sep  3 07:26:56 2007
@@ -2,7 +2,7 @@
 _SCEN="scenario"
 _SMPL_DIR="$PWD"
 _PORT=9090
-_SLEEP=1
+_SLEEP=3
 #You may change these to scenarios u need to run
 _LST="1 2 3 4 5"
 

Modified: webservices/rampart/trunk/c/src/omxmlsec/tokens/token_reference_list.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/tokens/token_reference_list.c?rev=572349&r1=572348&r2=572349&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/tokens/token_reference_list.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/tokens/token_reference_list.c Mon Sep  3 07:26:56
2007
@@ -92,7 +92,7 @@
     ref_list_ele = axiom_node_get_data_element(ref_list_node, env);
 
     /*Get children*/
-    qname = axutil_qname_create(env, OXS_NODE_DATA_REFERENCE,OXS_ENC_NS,OXS_ENC_NS);
+    qname = axutil_qname_create(env, OXS_NODE_DATA_REFERENCE, OXS_ENC_NS, OXS_ENC_NS);
     iter = axiom_element_get_children_with_qname(ref_list_ele, env, qname, ref_list_node);
     axutil_qname_free(qname, env);
     qname = NULL;

Modified: webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c?rev=572349&r1=572348&r2=572349&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c Mon Sep  3 07:26:56 2007
@@ -394,9 +394,13 @@
     status =  oxs_encryption_symmetric_crypt(env, enc_ctx, input_buf, result_buf);
 
     /*Free*/
+
     oxs_buffer_free(input_buf, env);
     input_buf = NULL;
 
+    AXIS2_FREE(env->allocator, cipher_val);
+    cipher_val = NULL;
+    
     AXIS2_FREE(env->allocator, new_cipher_val);
     new_cipher_val = NULL;
     

Modified: webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c?rev=572349&r1=572348&r2=572349&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c Mon Sep  3 07:26:56 2007
@@ -114,6 +114,11 @@
         oxs_error(env, ERROR_LOCATION, OXS_ERROR_TRANSFORM_FAILED,"Unsupported digest method
 %s", digest_mtd);
         return NULL;
     }
+    if(serialized_node){
+        AXIS2_FREE(env->allocator, serialized_node);
+        serialized_node = NULL;
+    }
+
     return digest;
 }
 

Modified: webservices/rampart/trunk/c/src/util/rampart_username_token.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_username_token.c?rev=572349&r1=572348&r2=572349&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_username_token.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_username_token.c Mon Sep  3 07:26:56 2007
@@ -183,8 +183,8 @@
             }
 
             if(nonce_val){
-                /*AXIS2_FREE(env->allocator, nonce_val);
-                nonce_val = NULL;*/
+                AXIS2_FREE(env->allocator, nonce_val);
+                nonce_val = NULL;
             }
             if(created_val)
             {



Mime
View raw message