Bugs item #1732329, was opened at 2007-06-06 22:39
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1732329&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.2.x
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Bogdan (bogdan_iancu)
Summary: dialog: memory leak on destroy_dlg

Initial Comment:
When the dialog is destroyed, there is a memory leak for the registered 
callbacks.  The following patch should fix it:

# diff -Naurp dlg_hash.c dlg_hash.c.new
--- dlg_hash.c  2007-06-06 15:32:41.000000000 -0400
+++ dlg_hash.c.new      2007-06-06 15:32:35.000000000 -0400
@@ -100,9 +100,19 @@ error0:
 
 static inline void destroy_dlg(struct dlg_cell *dlg)
 {
+       struct dlg_callback *cb;
+       struct dlg_callback *cb_t;
+
        DBG("DBUG:dialog:destroy_dlg: destroing dialog %p\n",dlg);
        if (dlg->to_tag.s && dlg->to_tag.len)
                shm_free(dlg->to_tag.s);
+       cb = dlg->cbs.first;
+       while(cb) {
+               cb_t = cb;
+               cb = cb->next;
+               /* FIXME - what about parameters ? */
+               shm_free(cb_t);
+       }
        shm_free(dlg);
 }
 


----------------------------------------------------------------------

>Comment By: Bogdan (bogdan_iancu)
Date: 2007-06-07 12:01

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Ovidiu,

I made the fix on trunk - please test it and if OK I will make the
backport to 1.2

thanks and regards,
bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1732329&group_id=139143

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

Reply via email to