Hello,

On 06/11/07 16:25, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:

 > Log Message:
 > -----------
 > - quick fix for presence crash due to free notify bodies in different
 > - types of event (mwi -- reported by Juha Heinanen) -- needs more
 > - analysis

daniel,

thanks for the fix.  in the meanwhile, i was reading the sources and as
far as i can tell, memory for notify_body is allocated using pkg_malloc
both in case when aggregation is not needed and is needed.
that's the str structure, not the content of it. Further down on the code, the notify_body->s is allocated differently. It is the pointer where the free crashed.

Cheers,
Daniel

-  in notify.c/get_p_notify_body():

        DBG("PRESENCE:get_p_notify_body: Event does not
                require aggregation\n");
        ...
        notify_body= (str*)pkg_malloc(sizeof(str));
        ...
        return notify_body;

- presence_xml/notify_body.c/agregate_xmls():

        ...
        body = (str*)pkg_malloc(sizeof(str));
        ...
        return body;

but let anca verify this.

-- juha


_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to