log: fix memory leak in regexp level set
authorIvan Malov <ivan.malov@oktetlabs.ru>
Sun, 21 Jan 2018 17:05:10 +0000 (17:05 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 25 Jan 2018 22:32:06 +0000 (23:32 +0100)
Fixes: a5279180f510 ("eal: change several log levels matching a regexp")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_eal/common/eal_common_log.c

index 5a3400e..37b2e20 100644 (file)
@@ -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;
 }