From 9ec9cdc1571ed2f3b6ed97bd30b641253bc6173f Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Sun, 11 Feb 2018 18:06:12 +0200 Subject: [PATCH] loader: ptable_close should check for NULL argument illumos issue #9098 --- usr/src/boot/sys/boot/common/part.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/src/boot/sys/boot/common/part.c b/usr/src/boot/sys/boot/common/part.c index 0a91aa768e..37eb7870ea 100644 --- a/usr/src/boot/sys/boot/common/part.c +++ b/usr/src/boot/sys/boot/common/part.c @@ -853,6 +853,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); -- 2.11.4.GIT