Index: sbin/mdmfs/mdmfs.c =================================================================== --- sbin/mdmfs/mdmfs.c +++ sbin/mdmfs/mdmfs.c @@ -275,6 +275,7 @@ do_mdconfig_attach_au(mdconfig_arg, mdtype); else do_mdconfig_attach(mdconfig_arg, mdtype); + free(mdconfig_arg); if (newfs) do_newfs(newfs_arg); do_mount(mount_arg, mtpoint); @@ -408,6 +409,7 @@ strncpy(linebuf, linep + mdnamelen, linelen); linebuf[linelen] = '\0'; ul = strtoul(linebuf, &p, 10); + free(linebuf); if (ul == ULONG_MAX || *p != '\n') errx(1, "unexpected output from mdconfig (attach)"); unit = ul;