You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by bi...@apache.org on 2018/08/21 16:26:19 UTC

svn commit: r1838566 - in /axis/axis2/c/core/trunk/src/core: engine/conf.c transport/http/sender/http_client.c

Author: billblough
Date: Tue Aug 21 16:26:18 2018
New Revision: 1838566

URL: http://svn.apache.org/viewvc?rev=1838566&view=rev
Log:
Fix memleaks

Modified:
    axis/axis2/c/core/trunk/src/core/engine/conf.c
    axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c

Modified: axis/axis2/c/core/trunk/src/core/engine/conf.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/engine/conf.c?rev=1838566&r1=1838565&r2=1838566&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/engine/conf.c (original)
+++ axis/axis2/c/core/trunk/src/core/engine/conf.c Tue Aug 21 16:26:18 2018
@@ -1684,6 +1684,8 @@ axis2_conf_get_default_module(
     ret_mod = (axis2_module_desc_t *)axutil_hash_get(all_modules, axutil_qname_to_string(mod_qname,
         env), AXIS2_HASH_KEY_STRING);
 
+    axutil_qname_free(mod_qname, env);
+
     return ret_mod;
 }
 

Modified: axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c?rev=1838566&r1=1838565&r2=1838566&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c (original)
+++ axis/axis2/c/core/trunk/src/core/transport/http/sender/http_client.c Tue Aug 21 16:26:18 2018
@@ -126,10 +126,14 @@ axis2_http_client_free(
 #ifdef AXIS2_SSL_ENABLED
 		if(http_client->data_stream->stream_type == AXIS2_STREAM_SOCKET)
 		{
+            axutil_stream_free(http_client->data_stream, env);
+            http_client->data_stream = NULL;
 			axutil_network_handler_close_socket(env, http_client->sockfd);
 			/** ssl streams of type AXIS2_STREAM_BASIC  will be handled by SSL_shutdown(); */
 		}
 #else
+        axutil_stream_free(http_client->data_stream, env);
+        http_client->data_stream = NULL;
 		axutil_network_handler_close_socket(env, http_client->sockfd);
 #endif
         http_client->sockfd = -1;