1
0
Fork 0

more mem leak fixes

This commit is contained in:
bagyenda 2011-10-12 10:21:42 +00:00
parent 58ebfcc0fd
commit 628fc0c744
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
2011-10-11 P. A. Bagyenda <bagyenda@dsmagic.com>
* Fixed mem leaks in mmsc uaprof module
* Fixed mem leak in get_content_type function
2011-10-03 P. A. Bagyenda <bagyenda@dsmagic.com>
* Fixed: compilation issue
2011-09-23 P. A. Bagyenda <bagyenda@dsmagic.com>

View File

@ -2922,7 +2922,8 @@ void get_content_from_sendmms_request(Octstr *body, List *headers, List *cgivars
Octstr *reply = NULL, *params = NULL;
http_header_add(reqh, "User-Agent", MM_NAME "/" VERSION);
*ctype = NULL;
if (mms_url_fetch_content(HTTP_METHOD_GET, s, reqh, NULL, &rph, &reply) == HTTP_OK)
get_content_type(rph, ctype, &params);
else
@ -2935,7 +2936,8 @@ void get_content_from_sendmms_request(Octstr *body, List *headers, List *cgivars
http_destroy_headers(reqh);
http_destroy_headers(*rh);
*rh = rph ? rph : http_create_empty_headers(); /* replace as real reply headers. */
*ctype = http_header_value(*rh, octstr_imm("Content-Type"));
if (*ctype == NULL)
*ctype = http_header_value(*rh, octstr_imm("Content-Type"));
octstr_destroy(params);
} else if ((s = http_cgi_variable(cgivars, "content")) != NULL) { /* any content. */
Octstr *_xctype = NULL; /* ... because cgi var stuff is destroyed elsewhere, we must dup it !! */