[sr-dev] [kamailio/kamailio] ucontacts in shared memory even on DB_ONLY (#997)

Victor Seva notifications at github.com
Thu Feb 16 14:43:04 CET 2017


I would say the origin of the problem is calls to get_urecord() without release_urecord()
```
/*!
 * \brief Release urecord previously obtained through get_urecord
 * \warning Failing to calls this function after get_urecord will
 * result in a memory leak when the DB_ONLY mode is used. When
 * the records is later deleted, e.g. with delete_urecord, then
 * its not necessary, as this function already releases the record.
 * \param _r released record
 */
void release_urecord(urecord_t* _r)
{
	if (db_mode==DB_ONLY) {
		free_urecord(_r);
	} else if (_r->contacts == 0) {
		mem_delete_urecord(_r->slot->d, _r);
	}
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/997#issuecomment-280333231
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20170216/85fe5bbc/attachment.html>


More information about the sr-dev mailing list