summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-10-25 23:28:19 +0000
committerdfr <dfr@FreeBSD.org>2000-10-25 23:28:19 +0000
commit28bd3a48b375266a804321a885fdb3111a5ef8e1 (patch)
tree3921eae1f2bd5ecfa1241d4d207b20aa0e9ffd05 /sys
parent0f792ce6e2e45dc65627db2ca3ebd3edc5f52378 (diff)
downloadFreeBSD-src-28bd3a48b375266a804321a885fdb3111a5ef8e1.zip
FreeBSD-src-28bd3a48b375266a804321a885fdb3111a5ef8e1.tar.gz
Don't indirect through a null pointer if we run out of kernel filenames.
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/common/boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/common/boot.c b/sys/boot/common/boot.c
index 1c65279..24cf890 100644
--- a/sys/boot/common/boot.c
+++ b/sys/boot/common/boot.c
@@ -261,7 +261,7 @@ getbootfile(int try)
strncpy(name, spec, len);
name[len] = 0;
}
- if (name[0] == 0) {
+ if (name && name[0] == 0) {
free(name);
name = NULL;
}
OpenPOWER on IntegriCloud