Revision
14113
Author
rupa
Date
2009-07-02 10:29:25 -0500 (Thu, 02 Jul 2009)

Log Message

another crash (intermittent) if called with no args

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/applications/mod_curl/mod_curl.c (14112 => 14113)


--- freeswitch/trunk/src/mod/applications/mod_curl/mod_curl.c	2009-07-02 15:23:54 UTC (rev 14112)
+++ freeswitch/trunk/src/mod/applications/mod_curl/mod_curl.c	2009-07-02 15:29:25 UTC (rev 14113)
@@ -290,7 +290,7 @@
 	if (http_data && http_data->headers) {
 		curl_slist_free_all(http_data->headers);
 	}
-	if (!session) {
+	if (!session && pool) {
 		switch_core_destroy_memory_pool(&pool);
 	}
 }
@@ -362,7 +362,7 @@
 		curl_slist_free_all(http_data->headers);
 	}
 	switch_safe_free(mydata);
-	if (!session) {
+	if (!session && pool) {
 		switch_core_destroy_memory_pool(&pool);
 	}
 	return status;
@@ -382,7 +382,7 @@
 
 	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",
-				   curl_app_function, "curl url", SAF_SUPPORT_NOMEDIA);
+				   curl_app_function, SYNTAX, SAF_SUPPORT_NOMEDIA);
 
 	/* indicate that the module should continue to be loaded */
 	return SWITCH_STATUS_SUCCESS;