diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 71c0949220..a1c17a24e8 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1148,9 +1148,7 @@ static int rule_add_line(UdevRuleFile *rule_file, const char *line_str, unsigned if (isempty(line_str)) return 0; - /* We use memdup_suffix0() here, since we want to add a second NUL byte to the end, since possibly - * some parsers might turn this into a "nulstr", which requires an extra NUL at the end. */ - line = memdup_suffix0(line_str, strlen(line_str) + 1); + line = strdup(line_str); if (!line) return log_oom();