Module: sip-router
Branch: master
Commit: b6b023038452a7cb1ded28bf82f81622b34ce201
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b6b0230…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 21 21:44:42 2014 +0200
pv: removed mistaken pkg_malloc() left for $cnt()
---
modules/pv/pv_core.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c
index ecf956a..3f48830 100644
--- a/modules/pv/pv_core.c
+++ b/modules/pv/pv_core.c
@@ -2593,6 +2593,9 @@ int pv_set_xto_attr(struct sip_msg* msg, pv_param_t *param,
LM_ERR("failed to set xto attribute %d\n", type);
goto error;
}
+ } else {
+ if(buf.s!=0)
+ pkg_free(buf.s);
}
return 0;
@@ -2780,7 +2783,6 @@ int pv_parse_cnt_name(pv_spec_p sp, str *in)
return -1;
pv = pv_cache_get(in);
- pv = (pv_spec_t*)pkg_malloc(sizeof(pv_spec_t));
if(pv==NULL) {
LM_ERR("cannot find pv name [%.*s]\n", in->len, in->s);
return -1;