error not set when memory allocation fails in axis2_stub_start_op_... generated 
code
------------------------------------------------------------------------------------

                 Key: AXIS2C-1305
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1305
             Project: Axis2-C
          Issue Type: Bug
          Components: code generation
    Affects Versions: Current (Nightly)
         Environment: Win
            Reporter: Patrick van Beem
            Priority: Minor
             Fix For: Current (Nightly)


In the axis2_stub_start_op_... generated code, the error fields are not set 
when memory allocation fails. The using code will assume the call succeeded 
because no error is set, while it actually failed (although out-of-mem is 
hopefully a rare situation). 
See example code from the calculator example:

         void AXIS2_CALL
         axis2_stub_start_op_Calculator_add( axis2_stub_t *stub, const 
axutil_env_t *env,

            :
            :
            callback_data = (struct axis2_stub_Calculator_add_callback_data*) 
AXIS2_MALLOC(env->allocator, 
                                    sizeof(struct 
axis2_stub_Calculator_add_callback_data));
            if(NULL == callback_data)
            {
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, 
AXIS2_FAILURE);  //  <=== This line was not there!
                AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "Can not allocate 
memeory for the callback data structures");
                return;
            }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to