naccyde / rpms / systemd

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