ipops: replace return with goto error to release resources
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 20 Jul 2017 19:55:34 +0000 (21:55 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 20 Jul 2017 19:55:34 +0000 (21:55 +0200)
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;
                }