Sfoglia il codice sorgente

tm: release re for t_check_status(pv)

- the canse when parameter is a variable and it contains a bad regex

(cherry picked from commit 2f01858d0be09cecd5e21e3e10fdd9d6425be028)
(cherry picked from commit ec542b2ae46391635032c4fe705dc05a2a5eebe4)
Daniel-Constantin Mierla 11 anni fa
parent
commit
948ba168fd
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      modules/tm/tm.c

+ 2 - 0
modules/tm/tm.c

@@ -945,6 +945,8 @@ static int t_check_status(struct sip_msg* msg, char *p1, char *foo)
 		
 		if (regcomp(re, s, REG_EXTENDED|REG_ICASE|REG_NEWLINE)) {
 			ERR("Bad regular expression '%s'\n", s);
+			pkg_free(re);
+			re = NULL;
 			goto error;
 		}
 		break;