From owner-svn-src-head@FreeBSD.ORG Sat Aug 10 20:54:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BE7C669E; Sat, 10 Aug 2013 20:54:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB683203C; Sat, 10 Aug 2013 20:54:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7AKsFhr075929; Sat, 10 Aug 2013 20:54:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7AKsFxZ075928; Sat, 10 Aug 2013 20:54:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308102054.r7AKsFxZ075928@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Aug 2013 20:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254191 - head/sys/dev/cpuctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Aug 2013 20:54:15 -0000 Author: kib Date: Sat Aug 10 20:54:15 2013 New Revision: 254191 URL: http://svnweb.freebsd.org/changeset/base/254191 Log: Match malloc(9) calls with free(9), not contigfree(9). Also remove unneeded checks for NULL, free(9) can handle NULL pointers on its own, and the regions were allocated with M_WAITOK flag as well. Reported and tested by: Larry Rosenman MFC after: 1 week Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Sat Aug 10 19:38:29 2013 (r254190) +++ head/sys/dev/cpuctl/cpuctl.c Sat Aug 10 20:54:15 2013 (r254191) @@ -346,8 +346,7 @@ update_intel(int cpu, cpuctl_update_args else ret = EEXIST; fail: - if (ptr != NULL) - contigfree(ptr, args->size, M_CPUCTL); + free(ptr, M_CPUCTL); return (ret); } @@ -476,8 +475,7 @@ update_via(int cpu, cpuctl_update_args_t else ret = 0; fail: - if (ptr != NULL) - contigfree(ptr, args->size, M_CPUCTL); + free(ptr, M_CPUCTL); return (ret); }