Skip to content

Commit

Permalink
Fix memleaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bblough committed Aug 21, 2018
1 parent c6a5375 commit 2cdf772
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/engine/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 4 additions & 0 deletions src/core/transport/http/sender/http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2cdf772

Please sign in to comment.