Dear Pekka,all with the following code (nua_create fails since IP is not valid on my machine), I spot two memory leaks of sofia-sip stack. One is due to the fact that task nua->nua_client is not deinit'ed in case of error, the other is due to the fact that nua default handle holds a soa_session_t pointer created with soa_create that is not deleted with soa_destroy (actually there is also sm_create that has no sm_destroy, but I have no code for that) Attached there is a possible patch for this (sm_destroy is missing ...). Thanks, Filippo
... static void nua_callback(nua_event_t event, int status, char const *phrase, nua_t *nua, nua_magic_t *magic, nua_handle_t *nh, nua_hmagic_t *hmagic, sip_t const *sip, tagi_t tags[]) { } int main(int argc, char* argv[]) { su_init(); su_root_t *r = su_root_create(NULL); nua_t *n = nua_create(r, nua_callback ,NULL, NUTAG_URL("sip:1.2.3.4:5060"), TAG_END()); su_root_destroy(r); su_deinit(); return 0; } Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie. This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
nua.c.patch
Description: nua.c.patch
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H
_______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel