chiark / gitweb /
[PATCH] check for empty symlink string
[elogind.git] / udev-add.c
index ba5c864165234e83b9072bb4a349cdb7b46f37d4..2f72613ea9fca7918b77908fd413e7d1d357cbde 100644 (file)
@@ -193,7 +193,7 @@ static int create_node(struct udevice *dev)
                symlinks = dev->symlink;
                while (1) {
                        linkname = strsep(&symlinks, " ");
-                       if (linkname == NULL)
+                       if (linkname == NULL || linkname[0] == '\0')
                                break;
 
                        strncpy(filename, udev_root, sizeof(filename));