rtpengine: free rtpl if error inside fixup_set_id()
authorDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 31 Jul 2017 13:52:45 +0000 (15:52 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 31 Jul 2017 13:54:27 +0000 (15:54 +0200)
src/modules/rtpengine/rtpengine.c

index d4f45bf..83c56ab 100644 (file)
@@ -1046,6 +1046,7 @@ static int fixup_set_id(void ** param, int param_no)
                int_val = pv_locate_name(&s);
                if(int_val<0 || int_val!=s.len) {
                        LM_ERR("invalid parameter %s\n", s.s);
+                       pkg_free(rtpl);
                        return -1;
                }
                rtpl->rpv = pv_cache_get(&s);