MFC r276704:Fix memory leaks.Sponsored by: The FreeBSD Foundation
MFC r276703:Remove leftovers.Sponsored by: The FreeBSD Foundation