Re: [PATCH] http.c
Stipe Tolj <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Wapme Systems AG |
| Message-ID | <[email protected]> |
> the check for != NULL is not necessary, yes. But the octstr_destroy is, as
> in http.c:parse_url:1155 , host is created.
> *host = octstr_copy(url, prefix_len, host_len);
but the host is inside the HTTPServe trans structure, it should be
free'ed there, see gwlib/http.c:616:
static void server_destroy(void *p)
{
HTTPServer *trans;
trans = p;
octstr_destroy(trans->url);
http_destroy_headers(trans->request_headers);
trans->request_headers = NULL;
octstr_destroy(trans->request_body);
entity_destroy(trans->response);
octstr_destroy(trans->host);
gw_free(trans);
}
and the previous server_create() garantees that the ->host is NULLed.
Stipe
[email protected]
-------------------------------------------------------------------
Wapme Systems AG
Vogelsanger Weg 80
40470 Düsseldorf
Tel: +49-211-74845-0
Fax: +49-211-74845-299
E-Mail: [email protected]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are