From 69529f9840f5de01a5865d2b55cd741713676956 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Tue, 27 Oct 2020 19:55:20 -0400 Subject: [PATCH] log: Fix missing negation of ENOMEM Errors returned should be negative. Fixes: 45fac9fc18 ("log: Correct missing free() on error in log_add_filter()") Signed-off-by: Sean Anderson Reviewed-by: Heinrich Schuchardt --- common/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/log.c b/common/log.c index 9f98e9aff8..f1de922b36 100644 --- a/common/log.c +++ b/common/log.c @@ -294,7 +294,7 @@ int log_add_filter(const char *drv_name, enum log_category_t cat_list[], if (file_list) { filt->file_list = strdup(file_list); if (!filt->file_list) { - ret = ENOMEM; + ret = -ENOMEM; goto err; } } -- 2.39.5