ipops: replace return with goto error to release resources
[sip-router] / src / modules / ipops / ipops_pv.c
index 279995c..a619a67 100644 (file)
@@ -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;
                }