diff --git a/src/util-logopenfile.c b/src/util-logopenfile.c index 89b7bdcf02..53022fa019 100644 --- a/src/util-logopenfile.c +++ b/src/util-logopenfile.c @@ -227,6 +227,7 @@ static char *SCLogFilenameFromPattern(const char *pattern) int rc = SCTimeToStringPattern(time(NULL), pattern, filename, PATH_MAX); if (rc != 0) { + SCFree(filename); return NULL; }