Module: kamailio
Branch: master
Commit: b28e2943b8d171628f81057a352507b2a56b91a4
URL:
https://github.com/kamailio/kamailio/commit/b28e2943b8d171628f81057a352507b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-08T09:48:35+02:00
registrar: free var in case of pv name error
---
Modified: src/modules/registrar/regpv.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b28e2943b8d171628f81057a352507b…
Patch:
https://github.com/kamailio/kamailio/commit/b28e2943b8d171628f81057a352507b…
---
diff --git a/src/modules/registrar/regpv.c b/src/modules/registrar/regpv.c
index 35bdd74e78..ad82262a04 100644
--- a/src/modules/registrar/regpv.c
+++ b/src/modules/registrar/regpv.c
@@ -288,8 +288,8 @@ int pv_parse_ulc_name(pv_spec_p sp, str *in)
{
str pn;
str pa;
- regpv_name_t *rp;
- regpv_profile_t *rpp;
+ regpv_name_t *rp = NULL;
+ regpv_profile_t *rpp = NULL;
if(sp==NULL || in==NULL || in->len<=0)
return -1;
@@ -414,6 +414,7 @@ int pv_parse_ulc_name(pv_spec_p sp, str *in)
return 0;
error:
+ if(rp) pkg_free(rp);
LM_ERR("unknown contact attr name in %.*s\n", in->len, in->s);
return -1;
}