teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0740-sysctl-fix-segfault.patch

be0c12
From b30c37b500cbe0587656d5092a95fa695772cd0e Mon Sep 17 00:00:00 2001
be0c12
From: Yu Watanabe <watanabe.yu+github@gmail.com>
be0c12
Date: Thu, 6 Feb 2020 19:13:11 +0900
be0c12
Subject: [PATCH] sysctl: fix segfault
be0c12
be0c12
Fixes #14801.
be0c12
be0c12
(cherry picked from commit db99904bc8482efe556bb010a8b203a3e60ee37f)
be0c12
be0c12
Resolves: #2037807
be0c12
---
be0c12
 src/sysctl/sysctl.c | 2 +-
be0c12
 1 file changed, 1 insertion(+), 1 deletion(-)
be0c12
be0c12
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
be0c12
index 7b0528877c..4c85d6887f 100644
be0c12
--- a/src/sysctl/sysctl.c
be0c12
+++ b/src/sysctl/sysctl.c
be0c12
@@ -183,7 +183,7 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign
be0c12
 
be0c12
                 existing = ordered_hashmap_get(sysctl_options, p);
be0c12
                 if (existing) {
be0c12
-                        if (streq(value, existing->value)) {
be0c12
+                        if (streq_ptr(value, existing->value)) {
be0c12
                                 existing->ignore_failure = existing->ignore_failure || ignore_failure;
be0c12
                                 continue;
be0c12
                         }