24 lines
841 B
Diff
24 lines
841 B
Diff
From 4dc646fa1ae83c570801a22d256e39eb3508a17b Mon Sep 17 00:00:00 2001
|
|
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
|
Date: Tue, 30 Jan 2024 11:59:54 +0100
|
|
Subject: [PATCH] conf-parser: fix OOM check
|
|
|
|
(cherry picked from commit 0fa25bd5f4789e8b37be5dd7927bab81c18c2dcd)
|
|
---
|
|
src/shared/conf-parser.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
|
|
index 59a529d4bcb..e8ecd9bc794 100644
|
|
--- a/src/shared/conf-parser.c
|
|
+++ b/src/shared/conf-parser.c
|
|
@@ -466,7 +466,7 @@ int hashmap_put_stats_by_path(Hashmap **stats_by_path, const char *path, const s
|
|
return -ENOMEM;
|
|
|
|
path_copy = strdup(path);
|
|
- if (!path)
|
|
+ if (!path_copy)
|
|
return -ENOMEM;
|
|
|
|
r = hashmap_put(*stats_by_path, path_copy, st_copy);
|