mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 17:32:43 +00:00
Don't indirect through a null pointer if we run out of kernel filenames.
This commit is contained in:
parent
a3fc4e0754
commit
bcdb85b6b8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67591
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user