Author: tsoome
Date: Mon Feb 18 20:29:19 2019
New Revision: 344268
URL: https://svnweb.freebsd.org/changeset/base/344268

Log:
  loader: ptable_close() should check its argument
  
  If the passed in table is NULL, just return.

Modified:
  head/stand/common/part.c

Modified: head/stand/common/part.c
==============================================================================
--- head/stand/common/part.c    Mon Feb 18 19:50:53 2019        (r344267)
+++ head/stand/common/part.c    Mon Feb 18 20:29:19 2019        (r344268)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to