[dpdk-dev] [PATCH] eal: fix a memory leak in regexp log level set API

Andrew Rybchenko arybchenko at solarflare.com
Sun Jan 21 18:05:10 CET 2018


From: Ivan Malov <ivan.malov at oktetlabs.ru>

Fixes: a5279180f510 ("eal: change several log levels matching a regexp")
Cc: stable at dpdk.org

Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 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 5a3400e..37b2e20 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.7.4



More information about the dev mailing list