[OpenSIPS-Devel] [ opensips-Bugs-2934618 ] possible memory leak in serialize.c

SourceForge.net noreply at sourceforge.net
Fri Jan 22 17:11:09 CET 2010


Bugs item #2934618, was opened at 2010-01-18 23:27
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2934618&group_id=232389

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: core
Group: 1.6.x
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Richard Revels (rrevels)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: possible memory leak in serialize.c

Initial Comment:
We have been chasing what appears to be a memory leak in opensips-1.6.1-notls.  We believe that in serialize_branches line 154 enc_info is being allocated but is not being freed in all cases.  We will continue tracking this but wanted to get it out where other eyes could look into it as well.

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

Comment By: Nobody/Anonymous (nobody)
Date: 2010-01-22 16:11

Message:
The patch has fixed the issue for us.  We are no longer able to detect any
memory leakage at all. 

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

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2010-01-21 17:34

Message:
Hi Richard,

Indeed there was a mem leak there - could you test the attached patch? it
should fix the problem. If ok, I will upload the patch on SVN.

Thanks and regards,
Bogdan

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

Comment By: Richard Revels (rrevels)
Date: 2010-01-19 15:56

Message:
To add to this, we think enc_info gets malloc'd.  Then contacts[i].enc_info
is set to that pointer.  Then val.s is also set to that pointer.  Next val
is used in a call to add_avp for serial_avp.  This malloc's and copies the
data from val.  val is left hanging on exit from serialize_branches and if
the pointer is freed from the contacts structure, we haven't found that
yet.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2934618&group_id=232389



More information about the Devel mailing list