diff options
author | dfr <dfr@FreeBSD.org> | 2000-10-25 23:28:19 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-10-25 23:28:19 +0000 |
commit | 28bd3a48b375266a804321a885fdb3111a5ef8e1 (patch) | |
tree | 3921eae1f2bd5ecfa1241d4d207b20aa0e9ffd05 /sys/boot | |
parent | 0f792ce6e2e45dc65627db2ca3ebd3edc5f52378 (diff) | |
download | FreeBSD-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/boot')
-rw-r--r-- | sys/boot/common/boot.c | 2 |
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; } |