sanity: free parsed proxy-required header in case of failure
authorDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 25 Jun 2019 21:03:17 +0000 (23:03 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 25 Jun 2019 21:04:00 +0000 (23:04 +0200)
- reported by GH #1990

src/modules/sanity/sanity.c

index d00eab5..04ad2b8 100644 (file)
@@ -698,6 +698,10 @@ int check_proxy_require(sip_msg_t* msg) {
                                }
                                LM_DBG("checking proxy require failed\n");
                                if (u) pkg_free(u);
+                               if (msg->proxy_require->parsed) {
+                                       free_str_list(msg->proxy_require->parsed);
+                                       msg->proxy_require->parsed = NULL;
+                               }
                                return SANITY_CHECK_FAILED;
                        }
                        else {