Module: sip-router
Branch: 4.0
Commit: 5980733615e8ea4d79b6b4c8e8c3cec00e871277
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5980733…
Author: Hugh Waite <hugh.waite(a)acision.com>
Committer: Hugh Waite <hugh.waite(a)acision.com>
Date: Tue Aug 12 19:56:45 2014 +0100
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 files changed, 1 insertions(+), 1 deletions(-)
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;