Author: kevans
Date: Thu Oct 24 02:33:12 2019
New Revision: 353975
URL: https://svnweb.freebsd.org/changeset/base/353975

Log:
  MFC r344268: loader: ptable_close() should check its argument

Modified:
  stable/12/stand/common/part.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/stand/common/part.c
==============================================================================
--- stable/12/stand/common/part.c       Thu Oct 24 02:32:22 2019        
(r353974)
+++ stable/12/stand/common/part.c       Thu Oct 24 02:33:12 2019        
(r353975)
@@ -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