mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
loader: ptable_close() should check its argument
If the passed in table is NULL, just return.
This commit is contained in:
parent
256c1bca9e
commit
63f582e0f5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344268
|
@ -788,6 +788,9 @@ ptable_close(struct ptable *table)
|
|||
{
|
||||
struct pentry *entry;
|
||||
|
||||
if (table == NULL)
|
||||
return;
|
||||
|
||||
while (!STAILQ_EMPTY(&table->entries)) {
|
||||
entry = STAILQ_FIRST(&table->entries);
|
||||
STAILQ_REMOVE_HEAD(&table->entries, entry);
|
||||
|
|
Loading…
Reference in a new issue