]> err.no Git - systemd/commitdiff
fix NAME= and OPTION+="string_escape=..." logic
authorKay Sievers <kay.sievers@vrfy.org>
Sun, 8 Feb 2009 15:02:15 +0000 (16:02 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Sun, 8 Feb 2009 15:02:15 +0000 (16:02 +0100)
Scott discovered this silly bug.

udev/udev-rules.c

index 52638aeb1db2f40af60bc11ff3bd95bc9c9d7c7c..f0b11aa85b9880c3c395b1336f9b0b1dce23ccdf 100644 (file)
@@ -2371,13 +2371,13 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                        count = udev_util_replace_chars(name_str, "/");
                                        if (count > 0)
                                                info(event->udev, "%i character(s) replaced\n", count);
-                                       free(event->name);
-                                       event->name = strdup(name_str);
-                                       info(event->udev, "NAME '%s' %s:%u\n",
-                                            event->name,
-                                            &rules->buf[rule->rule.filename_off],
-                                            rule->rule.filename_line);
                                }
+                               free(event->name);
+                               event->name = strdup(name_str);
+                               info(event->udev, "NAME '%s' %s:%u\n",
+                                    event->name,
+                                    &rules->buf[rule->rule.filename_off],
+                                    rule->rule.filename_line);
                                break;
                        }
                case TK_A_DEVLINK: