[OpenSIPS-Devel] [opensips] presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody. (#174)

2014-03-05 Thread Walter Doekes
This commit fixes a couple of presence issues (introduced in 80c48e6):
 * There was a memory leak in dlginfo_agg_nbody.
 * Bounds checking in dlginfo_agg_nbody was off by 4 (potential stack
   corruption).
 * There were 2 PKG allocs, straight after one another while no alloc
   was needed at all: reduced to 1 optional one.
 * Replace "dumy" with "dummy" in the vicinity.
You can merge this Pull Request by running:

  git pull https://github.com/wdoekes/opensips wjd-fix_dialogaggr_memleak

Or you can view, comment on it, or merge it online at:

  https://github.com/OpenSIPS/opensips/pull/174

-- Commit Summary --

  * presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody.
  * Remove debug code.

-- File Changes --

M modules/presence_callinfo/add_events.c (4)
M modules/presence_dialoginfo/notify_body.c (71)

-- Patch Links --

https://github.com/OpenSIPS/opensips/pull/174.patch
https://github.com/OpenSIPS/opensips/pull/174.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/174
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody. (#174)

2014-03-06 Thread Walter Doekes
(I squashes the two commits into one, just now.)

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/174#issuecomment-36837723___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody. (#174)

2014-03-10 Thread Bogdan Andrei IANCU
Merged #174.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/174___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody. (#174)

2014-03-10 Thread Bogdan Andrei IANCU
Many thanks @wdoekes  for this fix !

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/174#issuecomment-37238127___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody. (#174)

2014-03-11 Thread Damien Sandrs
Hi,

The leak was fixed in my local branch, and I apparently forgot to push it. 
Apologies.

About the bound checking error, the code was cut&pasted from another place in 
the same file where the same error is still present:

Line 165:
/* create the new NOTIFY body */
if ( (pres_user->len + pres_domain->len + 1) > MAX_URI_SIZE) {
LM_ERR("entity URI too long, maximum=%d\n", MAX_URI_SIZE);
return NULL;
}

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/174#issuecomment-37311079___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody. (#174)

2014-03-12 Thread Bogdan Andrei IANCU
Hi @dsandras , could you also confirm that the applied patch fixes the mem 
leaks you are aware about ?

Thanks and regards,
Bogdan

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/174#issuecomment-37464157___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody. (#174)

2014-03-14 Thread Damien Sandrs
Hi,

Yes. However, it seems to me that the probability for those leaks to 
appear was very weak (only in case of error). The leak was on pres_user 
not always being freed, which is not possible anymore as it is not 
dynamically allocated anymore.

Le 12/03/14 21:59, Bogdan Andrei IANCU a écrit :
>
> Hi @dsandras  , could you also confirm 
> that the applied patch fixes the mem leaks you are aware about ?
>
> Thanks and regards,
> Bogdan
>
> —
> Reply to this email directly or view it on GitHub 
> .
>




Damien SANDRAS

*Ekiga Project*
http://www.ekiga.org

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/174#issuecomment-37644817___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel