2
0
Эх сурвалжийг харах

regex: reset pointer after free to avoid double free if an error occurs

Daniel-Constantin Mierla 10 жил өмнө
parent
commit
379667e878

+ 1 - 0
modules/regex/regex_mod.c

@@ -411,6 +411,7 @@ static int load_pcres(int action)
 		memcpy(pcres_tmp[i], pcre_tmp, pcre_size);
 		pcre_free(pcre_tmp);
 		pkg_free(patterns[i]);
+		patterns[i] = NULL;
 	}
 	
 	/* Copy to shared memory */