summaryrefslogtreecommitdiffstats
path: root/src/core/transport/http
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/transport/http')
-rw-r--r--src/core/transport/http/sender/http_transport_sender.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/transport/http/sender/http_transport_sender.c b/src/core/transport/http/sender/http_transport_sender.c
index 3ef55b0..6dc43fa 100644
--- a/src/core/transport/http/sender/http_transport_sender.c
+++ b/src/core/transport/http/sender/http_transport_sender.c
@@ -777,12 +777,14 @@ axis2_http_transport_sender_write_message(
status = AXIS2_HTTP_SENDER_SEND(sender, env, msg_ctx, out, url, soap_action);
#endif
- AXIS2_HTTP_SENDER_FREE(sender, env);
- sender = NULL;
/* if the send was not successful, do not process any response */
if(status != AXIS2_SUCCESS)
+ {
+ AXIS2_HTTP_SENDER_FREE(sender, env);
+ sender = NULL;
return status;
+ }
op = axis2_msg_ctx_get_op(msg_ctx, env);
if(op)
@@ -793,6 +795,8 @@ axis2_http_transport_sender_write_message(
if(axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 || axutil_strcmp(mep,
AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0 || axutil_strcmp(mep, AXIS2_MEP_URI_IN_ONLY) == 0)
{
+ AXIS2_HTTP_SENDER_FREE(sender, env);
+ sender = NULL;
return status;
}
else
@@ -811,6 +815,9 @@ axis2_http_transport_sender_write_message(
}
}
+ AXIS2_HTTP_SENDER_FREE(sender, env);
+ sender = NULL;
+
return status;
}