Two trivial sizes for free in config_deferred.
The other one in the file are a bit trickier and needs more moving
things around.

Index: subr_autoconf.c
===================================================================
RCS file: /cvs/src/sys/kern/subr_autoconf.c,v
retrieving revision 1.90
diff -u -p -r1.90 subr_autoconf.c
--- subr_autoconf.c     11 Dec 2015 16:07:02 -0000      1.90
+++ subr_autoconf.c     18 Dec 2015 15:29:03 -0000
@@ -725,7 +725,7 @@ config_process_deferred_children(struct 
                if (dc->dc_dev->dv_parent == parent) {
                        TAILQ_REMOVE(&deferred_config_queue, dc, dc_queue);
                        (*dc->dc_func)(dc->dc_dev);
-                       free(dc, M_DEVBUF, 0);
+                       free(dc, M_DEVBUF, sizeof(*dc));
                        config_pending_decr();
                }
        }
@@ -743,7 +743,7 @@ config_process_deferred_mountroot(void)
        while ((dc = TAILQ_FIRST(&mountroot_config_queue)) != NULL) {
                TAILQ_REMOVE(&mountroot_config_queue, dc, dc_queue);
                (*dc->dc_func)(dc->dc_dev);
-               free(dc, M_DEVBUF, 0);
+               free(dc, M_DEVBUF, sizeof(*dc));
        }
 }

Reply via email to