Module: sip-router
Branch: 3.2
Commit: 28a5c122372d9c15d9db1514d3921a98edf9eee6
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=28a5c12…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Jan 30 11:28:59 2012 +0000
modules_k/pua: Fixed occasional seg fault in PUA
- This was added by the fix to the race hazards
(Commit ID: e627bc31776b521a1078b2a004e8ed179521cae2)
- It only happens in certain error situations (which should not occur anyway -
these are under investigation now) and was found during an over-weekend
soak test.
- Found and fixed by Paul Pankhurst @ Crocodile RCS
(cherry picked from commit 6d30bd740303677711de437c4a3fec15da7344a8)
---
modules_k/pua/send_subscribe.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules_k/pua/send_subscribe.c b/modules_k/pua/send_subscribe.c
index c4caad1..86c651d 100644
--- a/modules_k/pua/send_subscribe.c
+++ b/modules_k/pua/send_subscribe.c
@@ -627,8 +627,11 @@ done:
goto end;
error:
- if (presentity->remote_contact.s) shm_free(presentity->remote_contact.s);
- if (presentity) shm_free(presentity);
+ if (presentity)
+ {
+ if (presentity->remote_contact.s) shm_free(presentity->remote_contact.s);
+ shm_free(presentity);
+ }
end:
if(hentity)