From 01aa0d95c82163e72e69ac90b3c8cfa15728ce61 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Sun, 21 Jan 2018 17:05:10 +0000 Subject: [PATCH] log: fix memory leak in regexp level set Fixes: a5279180f510 ("eal: change several log levels matching a regexp") Cc: stable@dpdk.org Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko Reviewed-by: Ferruh Yigit Acked-by: Olivier Matz --- lib/librte_eal/common/eal_common_log.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 5a3400e29c..37b2e20e53 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -110,6 +110,8 @@ rte_log_set_level_regexp(const char *pattern, uint32_t level) rte_logs.dynamic_types[i].loglevel = level; } + regfree(&r); + return 0; } -- 2.20.1