From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 21:54:35 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 024A7FDD; Wed, 29 Apr 2015 21:54:35 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E52421CC5; Wed, 29 Apr 2015 21:54:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TLsYpX060554; Wed, 29 Apr 2015 21:54:34 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TLsYpQ060553; Wed, 29 Apr 2015 21:54:34 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292154.t3TLsYpQ060553@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 21:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282249 - head/sys/kern 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.20 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: Wed, 29 Apr 2015 21:54:35 -0000 Author: oshogbo Date: Wed Apr 29 21:54:34 2015 New Revision: 282249 URL: https://svnweb.freebsd.org/changeset/base/282249 Log: Always use the nv_malloc macro instead of malloc(3). Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed Apr 29 21:50:04 2015 (r282248) +++ head/sys/kern/subr_nvlist.c Wed Apr 29 21:54:34 2015 (r282249) @@ -963,7 +963,7 @@ nvlist_recv(int sock) nfds = (size_t)nvlhdr.nvlh_descriptors; size = sizeof(nvlhdr) + (size_t)nvlhdr.nvlh_size; - buf = malloc(size); + buf = nv_malloc(size); if (buf == NULL) return (NULL); @@ -976,7 +976,7 @@ nvlist_recv(int sock) goto out; if (nfds > 0) { - fds = malloc(nfds * sizeof(fds[0])); + fds = nv_malloc(nfds * sizeof(fds[0])); if (fds == NULL) goto out; if (fd_recv(sock, fds, nfds) == -1)