Module: sip-router
Branch: master
Commit: c26801f44c260b3989f525bf2b26670d4cc7f651
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c26801f…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Wed Sep 29 16:27:46 2010 +0200
core: route(dynamic expression) memleak fix
When using a dynamic expression as argument to route() (e.g.
route($foo) or route($foo + "1")), the evaluated rvalue was not
freed.
---
action.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/action.c b/action.c
index 3768dfa..dd0cfef 100644
--- a/action.c
+++ b/action.c
@@ -680,11 +680,13 @@ int do_action(struct run_act_ctx* h, struct action* a, struct
sip_msg* msg)
if (unlikely(i < 0)) {
ERR("route \"%s\" not found at %s:%d\n",
s.s, (a->cfile)?a->cfile:"line", a->cline);
+ rval_destroy(rv);
rval_cache_clean(&c1);
s.s = 0;
ret = E_SCRIPT;
goto error;
}
+ rval_destroy(rv);
rval_cache_clean(&c1);
s.s = 0;
} else {