loader: ptable_close() should check its argument
If the passed in table is NULL, just return.
This commit is contained in:
parent
d3f45de15b
commit
6d5dd527a9
@ -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 New Issue
Block a user