mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't indirect through a null pointer if we run out of kernel filenames.
This commit is contained in:
parent
a3fc4e0754
commit
bcdb85b6b8
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue