aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-16 18:37:19 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-16 18:37:19 +0100
commit8d4a8d195ddcf34e5ff8a9602994ad6737f40df8 (patch)
tree90e0f412602d6b2149832ee857d1155904d6d0e2
parentd46c36c74edc78242bacba1dc64576fe4e2e292a (diff)
downloadbusybox-w32-8d4a8d195ddcf34e5ff8a9602994ad6737f40df8.tar.gz
busybox-w32-8d4a8d195ddcf34e5ff8a9602994ad6737f40df8.tar.bz2
busybox-w32-8d4a8d195ddcf34e5ff8a9602994ad6737f40df8.zip
mdev: fix a trivial SEGV
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/mdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 9c9d95f8a..3cee3a669 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -140,7 +140,7 @@ static void make_device(char *path, int delete)
140 * But since 2.6.25 block devices are also in /sys/class/block. 140 * But since 2.6.25 block devices are also in /sys/class/block.
141 * We use strstr("/block/") to forestall future surprises. */ 141 * We use strstr("/block/") to forestall future surprises. */
142 type = S_IFCHR; 142 type = S_IFCHR;
143 if (strstr(path, "/block/") || strncmp(G.subsystem, "block", 5) == 0) 143 if (strstr(path, "/block/") || (G.subsystem && strncmp(G.subsystem, "block", 5) == 0))
144 type = S_IFBLK; 144 type = S_IFBLK;
145 145
146 /* Make path point to "subsystem/device_name" */ 146 /* Make path point to "subsystem/device_name" */