diff --git a/stand/common/part.c b/stand/common/part.c index a1fa5e69fde7..672389dad3aa 100644 --- a/stand/common/part.c +++ b/stand/common/part.c @@ -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);