+ existing = hashmap_get(sysctl_options, p);
+ if (existing) {
+ if (!streq(value, existing))
+ log_warning("Duplicate assignment of %s in file '%s', ignoring.",
+ p, path);
+
+ continue;
+ }
+
+ property = strdup(p);
+ if (!property)
+ return log_oom();
+
+ new_value = strdup(value);
+ if (!new_value) {
+ free(property);
+ return log_oom();
+ }
+
+ k = hashmap_put(sysctl_options, property, new_value);
+ if (k < 0) {
+ log_error("Failed to add sysctl variable %s to hashmap: %s", property, strerror(-r));
+ free(property);
+ free(new_value);
+ return k;
+ }
+ }