Author: damitha
Date: Wed Feb 27 01:26:47 2008
New Revision: 631523

URL: http://svn.apache.org/viewvc?rev=631523&view=rev
Log:
Fixed unhandled null checks

Modified:
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
    webservices/sandesha/trunk/c/src/util/terminate_mgr.c

Modified: webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c?rev=631523&r1=631522&r2=631523&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c 
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Wed Feb 
27 01:26:47 2008
@@ -1553,10 +1553,10 @@
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
     create_seq_rm_msg = sandesha2_msg_creator_create_create_seq_msg(env,
         rm_msg_ctx, internal_seq_id, acks_to, seq_prop_mgr);
-    sandesha2_msg_ctx_set_flow(create_seq_rm_msg, env, 
-        SANDESHA2_MSG_CTX_OUT_FLOW);
     if(!create_seq_rm_msg)
         return AXIS2_FAILURE;
+    sandesha2_msg_ctx_set_flow(create_seq_rm_msg, env, 
+        SANDESHA2_MSG_CTX_OUT_FLOW);
     create_seq_part = sandesha2_msg_ctx_get_create_seq(create_seq_rm_msg, env);
     {
         sandesha2_seq_property_bean_t *to_epr_bean = NULL;

Modified: 
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c?rev=631523&r1=631522&r2=631523&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c 
(original)
+++ 
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c 
Wed Feb 27 01:26:47 2008
@@ -397,6 +397,25 @@
             acks_to = (axis2_char_t *) 
axis2_endpoint_ref_get_address(acks_to_epr, env);
             create_seq_rm_msg = 
sandesha2_msg_creator_create_create_seq_msg(env,
                 rm_msg_ctx, internal_seq_id, acks_to, seq_prop_mgr);
+            if(!create_seq_rm_msg)
+            {
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "[sandesha2]create_seq_rm_msg is NULL");
+                if(seq_prop_mgr)
+                    sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
+                if(create_seq_mgr)
+                    sandesha2_create_seq_mgr_free(create_seq_mgr, env);
+                if(sender_mgr)
+                    sandesha2_sender_mgr_free(sender_mgr, env);
+                if(next_msg_mgr)
+                    sandesha2_next_msg_mgr_free(next_msg_mgr, env);
+                if(storage_mgr)
+                    sandesha2_storage_mgr_free(storage_mgr, env);
+                if(create_seq_rm_msg)
+                    sandesha2_msg_ctx_free(create_seq_rm_msg, env);
+                return AXIS2_FAILURE;
+
+            }
             sandesha2_msg_ctx_set_flow(create_seq_rm_msg, env, 
                 SANDESHA2_MSG_CTX_OUT_FLOW);
             create_seq_msg = sandesha2_msg_ctx_get_msg_ctx(create_seq_rm_msg, 
env);

Modified: 
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c?rev=631523&r1=631522&r2=631523&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c 
(original)
+++ 
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c 
Wed Feb 27 01:26:47 2008
@@ -432,6 +432,8 @@
     out_msg_ctx = sandesha2_utils_create_out_msg_ctx(env, msg_ctx);
     out_rm_msg = sandesha2_msg_creator_create_terminate_seq_res_msg(env, 
         rm_msg_ctx, out_msg_ctx, seq_prop_mgr);
+    if(!out_rm_msg)
+        return AXIS2_FAILURE;
     ack_rm_msg = sandesha2_ack_mgr_generate_ack_msg(env, rm_msg_ctx, seq_id,
         seq_prop_mgr);
     if(ack_rm_msg)

Modified: webservices/sandesha/trunk/c/src/util/terminate_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/terminate_mgr.c?rev=631523&r1=631522&r2=631523&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Wed Feb 27 01:26:47 
2008
@@ -735,6 +735,8 @@
     }
     terminate_rm_msg = sandesha2_msg_creator_create_terminate_seq_msg(env,
         rm_msg_ctx, out_seq_id, int_seq_id, seq_prop_mgr);
+    if(!terminate_rm_msg)
+        return AXIS2_FAILURE;
     sandesha2_msg_ctx_set_flow(terminate_rm_msg, env, AXIS2_OUT_FLOW);
     property = axutil_property_create_with_args(env, 0, 0, 0, 
AXIS2_VALUE_TRUE);
     sandesha2_msg_ctx_set_property(terminate_rm_msg, env, 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to