Print this page
patch tsoome-feedback
patch cleanup
6659 nvlist_free(NULL) is a no-op

@@ -22,12 +22,10 @@
 /*
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 /* enable debug output and some debug asserts */
 #undef  _IPQOS_CONF_DEBUG
 
 #include <stdlib.h>
 #include <unistd.h>

@@ -620,11 +618,10 @@
                 goto fail;
         }
 
         return (IPQOS_CONF_SUCCESS);
 fail:
-        if (nvl != NULL)
                 nvlist_free(nvl);
         return (IPQOS_CONF_ERR);
 }
 
 

@@ -709,11 +706,10 @@
                 goto fail;
         }
 
         return (IPQOS_CONF_SUCCESS);
 fail:
-        if (nvl != NULL)
                 nvlist_free(nvl);
         return (IPQOS_CONF_ERR);
 }
 
 /*

@@ -774,11 +770,10 @@
                 goto fail;
         }
 
         return (IPQOS_CONF_SUCCESS);
 fail:
-        if (nvl != NULL)
                 nvlist_free(nvl);
         return (IPQOS_CONF_ERR);
 }
 
 /*

@@ -6343,11 +6338,10 @@
         if (cls == NULL)
                 return;
 
         /* free its nvlist if present */
 
-        if (cls->nvlist)
                 nvlist_free(cls->nvlist);
 
         /* free its action refs if present */
 
         if (cls->alist)

@@ -6788,11 +6782,10 @@
 
         ipqos_conf_act_ref_t *aref = arefs;
         ipqos_conf_act_ref_t *next;
 
         while (aref) {
-                if (aref->nvlist)
                         nvlist_free(aref->nvlist);
                 next = aref->next;
                 free(aref);
                 aref = next;
         }