altq/hfsc: Fix wrong malloc size
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 22 Feb 2013 07:16:36 +0000 (15:16 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 22 Feb 2013 07:19:05 +0000 (15:19 +0800)
Reported-by: pavalos@
sys/net/altq/altq_hfsc.c

index 2c3d69a..1b6b935 100644 (file)
@@ -1138,7 +1138,7 @@ ellist_alloc(void)
 {
        ellist_t *head;
 
-       head = kmalloc(sizeof(ellist_t *), M_ALTQ, M_WAITOK);
+       head = kmalloc(sizeof(*head), M_ALTQ, M_WAITOK);
        TAILQ_INIT(head);
        return (head);
 }