Index: sbin/mdmfs/mdmfs.c =================================================================== --- sbin/mdmfs/mdmfs.c +++ sbin/mdmfs/mdmfs.c @@ -275,9 +275,12 @@ do_mdconfig_attach_au(mdconfig_arg, mdtype); else do_mdconfig_attach(mdconfig_arg, mdtype); + free(mdconfig_arg); if (newfs) do_newfs(newfs_arg); + free(newfs_arg); do_mount(mount_arg, mtpoint); + free(mount_arg); do_mtptsetup(mtpoint, &mi); return (0); @@ -408,6 +411,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;