diff --git a/stand/kboot/libkboot/seg.c b/stand/kboot/libkboot/seg.c index 395c593bcab..6979d5cfa5f 100644 --- a/stand/kboot/libkboot/seg.c +++ b/stand/kboot/libkboot/seg.c @@ -20,6 +20,7 @@ init_avail(void) free(segs); nr_seg = 0; segalloc = 16; + free(segs); segs = malloc(sizeof(*segs) * segalloc); if (segs == NULL) panic("not enough memory to get memory map\n");