提交 8e6dc296 authored 作者: Rupa Schomaker's avatar Rupa Schomaker

another crash (intermittent) if called with no args


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14113 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 56d63b10
...@@ -290,7 +290,7 @@ done: ...@@ -290,7 +290,7 @@ done:
if (http_data && http_data->headers) { if (http_data && http_data->headers) {
curl_slist_free_all(http_data->headers); curl_slist_free_all(http_data->headers);
} }
if (!session) { if (!session && pool) {
switch_core_destroy_memory_pool(&pool); switch_core_destroy_memory_pool(&pool);
} }
} }
...@@ -362,7 +362,7 @@ done: ...@@ -362,7 +362,7 @@ done:
curl_slist_free_all(http_data->headers); curl_slist_free_all(http_data->headers);
} }
switch_safe_free(mydata); switch_safe_free(mydata);
if (!session) { if (!session && pool) {
switch_core_destroy_memory_pool(&pool); switch_core_destroy_memory_pool(&pool);
} }
return status; return status;
...@@ -382,7 +382,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_curl_load) ...@@ -382,7 +382,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_curl_load)
SWITCH_ADD_API(api_interface, "curl", "curl API", curl_function, SYNTAX); SWITCH_ADD_API(api_interface, "curl", "curl API", curl_function, SYNTAX);
SWITCH_ADD_APP(app_interface, "curl", "Perform a http request", "Perform a http request", SWITCH_ADD_APP(app_interface, "curl", "Perform a http request", "Perform a http request",
curl_app_function, "curl url", SAF_SUPPORT_NOMEDIA); curl_app_function, SYNTAX, SAF_SUPPORT_NOMEDIA);
/* indicate that the module should continue to be loaded */ /* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论