[sr-dev] git:master:a4ee0d3f: ipops: replace return with goto error to release resources

Daniel-Constantin Mierla miconda at gmail.com
Thu Jul 20 21:56:41 CEST 2017


Module: kamailio
Branch: master
Commit: a4ee0d3fd0c1b4147d462c8275d0150e8e934e2f
URL: https://github.com/kamailio/kamailio/commit/a4ee0d3fd0c1b4147d462c8275d0150e8e934e2f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-20T21:55:34+02:00

ipops: replace return with goto error to release resources

---

Modified: src/modules/ipops/ipops_pv.c

---

Diff:  https://github.com/kamailio/kamailio/commit/a4ee0d3fd0c1b4147d462c8275d0150e8e934e2f.diff
Patch: https://github.com/kamailio/kamailio/commit/a4ee0d3fd0c1b4147d462c8275d0150e8e934e2f.patch

---

diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c
index 279995cf42..a619a67f99 100644
--- a/src/modules/ipops/ipops_pv.c
+++ b/src/modules/ipops/ipops_pv.c
@@ -249,7 +249,7 @@ int pv_parse_dns_name(pv_spec_t *sp, str *in)
 			if(p!=pvi.s+pvi.len)
 			{
 				LM_ERR("invalid index [%.*s]\n", in->len, in->s);
-				return -1;
+				goto error;
 			}
 			dpv->nidx *= sign;
 		}




More information about the sr-dev mailing list