[Devel] SF.net SVN: openser: [2351]
trunk/modules/presence/notify.c
Daniel-Constantin Mierla
daniel at voice-system.ro
Tue Jun 12 00:44:37 CEST 2007
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
>
>
More information about the Devel
mailing list