diff options
author | CoprDistGit <infra@openeuler.org> | 2024-12-12 02:54:13 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-12-12 02:54:13 +0000 |
commit | a35fcc8b3fc340a6b874440b2a87e155c807ece5 (patch) | |
tree | 02ca631dd69c05a4dfcbd98a0ed12e2b0d2cd035 /backport-fix-conf-parser-oom-check-issue.patch | |
parent | b7abaf7e217d7948f8101d25013189a9322dd6ef (diff) |
automatic import of systemdopeneuler24.03_LTS
Diffstat (limited to 'backport-fix-conf-parser-oom-check-issue.patch')
-rw-r--r-- | backport-fix-conf-parser-oom-check-issue.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/backport-fix-conf-parser-oom-check-issue.patch b/backport-fix-conf-parser-oom-check-issue.patch new file mode 100644 index 0000000..689f06b --- /dev/null +++ b/backport-fix-conf-parser-oom-check-issue.patch @@ -0,0 +1,23 @@ +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); |