mirror of https://github.com/sipwise/kamailio.git
parent
6fd2698ff9
commit
ae2fb05098
@ -0,0 +1,37 @@
|
||||
From 6c967cebd213d1820cd1af428db5449b1af9aec1 Mon Sep 17 00:00:00 2001
|
||||
From: Hugh Waite <hugh.waite@acision.com>
|
||||
Date: Tue, 12 Aug 2014 19:52:27 +0100
|
||||
Subject: [PATCH] outbound: Fix memory leak
|
||||
|
||||
- Free parameters parsed when checking for ob markers
|
||||
(cherry picked from commit 392689597376eb6f047c12504bcce367f5940260)
|
||||
---
|
||||
modules/outbound/ob_mod.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
|
||||
index 038c5fa..aae1e10 100644
|
||||
--- a/modules/outbound/ob_mod.c
|
||||
+++ b/modules/outbound/ob_mod.c
|
||||
@@ -385,6 +385,8 @@ static int use_outbound_non_reg(struct sip_msg *msg)
|
||||
LM_ERR("parsing Route-URI parameters\n");
|
||||
return 0;
|
||||
}
|
||||
+ /* Not interested in param body - just the hooks */
|
||||
+ free_params(params);
|
||||
|
||||
if (hooks.uri.ob)
|
||||
{
|
||||
@@ -450,6 +452,9 @@ static int use_outbound_non_reg(struct sip_msg *msg)
|
||||
LM_ERR("parsing Contact-URI parameters\n");
|
||||
return 0;
|
||||
}
|
||||
+ /* Not interested in param body - just the hooks */
|
||||
+ free_params(params);
|
||||
+
|
||||
if (hooks.contact.ob)
|
||||
{
|
||||
LM_DBG("found ;ob parameter on Contact-URI - outbound"
|
||||
--
|
||||
2.1.0.rc1
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 8ce72b602046e39c862c7db7eb885ca4b3ac960c Mon Sep 17 00:00:00 2001
|
||||
From: Hugh Waite <hugh.waite@acision.com>
|
||||
Date: Tue, 12 Aug 2014 19:56:45 +0100
|
||||
Subject: [PATCH] core/parser: Free rr correctly in error cases
|
||||
|
||||
- Fix potential memory leak if parameters are parsed into rr structure
|
||||
(cherry picked from commit b40d92962b680ac29dd38ffe3c8f1aa1e39d3a97)
|
||||
---
|
||||
parser/parse_rr.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/parser/parse_rr.c b/parser/parse_rr.c
|
||||
index d3a2938..e3df4f3 100644
|
||||
--- a/parser/parse_rr.c
|
||||
+++ b/parser/parse_rr.c
|
||||
@@ -138,7 +138,7 @@ static inline int do_parse_rr_body(char *buf, int len, rr_t **head)
|
||||
}
|
||||
|
||||
error:
|
||||
- if (r) pkg_free(r);
|
||||
+ if (r) free_rr(r);
|
||||
free_rr(head); /* Free any contacts created so far */
|
||||
return -1;
|
||||
|
||||
--
|
||||
2.1.0.rc1
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
From 1d44d71e1786182df3f81f7abf206e13faae9d26 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Thu, 14 Aug 2014 18:24:31 +0200
|
||||
Subject: [PATCH] parser/rr: free_rr() is expecting rr_t** parameter
|
||||
|
||||
- give the parameter as &r, following the commit
|
||||
b40d92962b680ac29dd38ffe3c8f1aa1e39d3a97
|
||||
|
||||
(cherry picked from commit 34ba948cdabf7139c8563e531f18c4a486b31a00)
|
||||
---
|
||||
parser/parse_rr.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/parser/parse_rr.c b/parser/parse_rr.c
|
||||
index e3df4f3..0f293eb 100644
|
||||
--- a/parser/parse_rr.c
|
||||
+++ b/parser/parse_rr.c
|
||||
@@ -138,7 +138,7 @@ static inline int do_parse_rr_body(char *buf, int len, rr_t **head)
|
||||
}
|
||||
|
||||
error:
|
||||
- if (r) free_rr(r);
|
||||
+ if (r) free_rr(&r);
|
||||
free_rr(head); /* Free any contacts created so far */
|
||||
return -1;
|
||||
|
||||
--
|
||||
2.1.0.rc1
|
||||
|
||||
Loading…
Reference in new issue