diff options
author | Toomas Soome <tsoome@me.com> | 2018-02-11 18:06:12 +0200 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@joyent.com> | 2018-02-12 11:58:12 +0100 |
commit | 7ac713f36e72e44b5a64f189578b1f7f617c66e6 (patch) | |
tree | 96100fd599c9362dc9ff82ec52273797c7e8364d | |
parent | e54e6a394a25bb87fc39c6f223d139a8b9f8d778 (diff) | |
download | illumos-joyent-7ac713f36e72e44b5a64f189578b1f7f617c66e6.tar.gz |
9098 loader: ptable_close should check for NULL argument
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Approved by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
-rw-r--r-- | usr/src/boot/sys/boot/common/part.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |