Hi, list.
I suspect memory leak in wap-appl.c
It's about set_referer_url():

static void set_referer_url(Octstr *url, WSPMachine *sm)
{
        gw_assert(url != NULL);
        gw_assert(sm != NULL);

    sm->referer_url = octstr_duplicate(url);
}

In wap-appl.c we use it:

            if (session_id != -1) {
                debug("wap.wsp.http",0,"WSP: Setting Referer URL to <%s>",
                      octstr_get_cstr(url));
                if ((sm = find_session_machine_by_id(session_id)) != NULL) {
                    set_referer_url(url, sm);
                } else {
                    error(0,"WSP: Failed to find session machine for ID %ld",
                          session_id);
                }
            }

I don't see where preovious sm->referer_url destroyed.
Must we before
sm->referer_url = octstr_duplicate(url);
Insert
octstr_destroy(sm->referer_url); ?

Or may be I simply didn't find where it destroyed ;-) .

--
Vjacheslav Chekushin                                mailto:[EMAIL PROTECTED]
Latvian Mobile Phone Company                        http://www.lmt.lv


Reply via email to