From 339065599624467600750c42786585ed85d43122 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Thu, 7 Jan 2021 09:46:02 +0100 Subject: [PATCH] signature: Fix leak in urilen parsing cf #4254 (cherry picked from commit 47dd9a5ebc26dac25b63b5ca37062e7a63cd5335) --- src/detect-urilen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/detect-urilen.c b/src/detect-urilen.c index 941df1ade3..b2f7595dab 100644 --- a/src/detect-urilen.c +++ b/src/detect-urilen.c @@ -222,13 +222,15 @@ error: if (urilend) SCFree(urilend); if (arg1 != NULL) - SCFree(arg1); + pcre_free_substring(arg1); if (arg2 != NULL) - SCFree(arg2); + pcre_free_substring(arg2); if (arg3 != NULL) - SCFree(arg3); + pcre_free_substring(arg3); if (arg4 != NULL) - SCFree(arg4); + pcre_free_substring(arg4); + if (arg5 != NULL) + pcre_free_substring(arg5); return NULL; } -- 2.47.2