Date: Sun, 3 Jan 2016 07:40:11 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r293082 - user/ngie/stable-10-libnv/sys/kern Message-ID: <201601030740.u037eBti098539@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sun Jan 3 07:40:11 2016 New Revision: 293082 URL: https://svnweb.freebsd.org/changeset/base/293082 Log: MFC r282249: r282249 (by oshogbo): Always use the nv_malloc macro instead of malloc(3). Modified: user/ngie/stable-10-libnv/sys/kern/subr_nvlist.c Directory Properties: user/ngie/stable-10-libnv/ (props changed) Modified: user/ngie/stable-10-libnv/sys/kern/subr_nvlist.c ============================================================================== --- user/ngie/stable-10-libnv/sys/kern/subr_nvlist.c Sun Jan 3 07:37:46 2016 (r293081) +++ user/ngie/stable-10-libnv/sys/kern/subr_nvlist.c Sun Jan 3 07:40:11 2016 (r293082) @@ -927,7 +927,7 @@ nvlist_recv(int sock, int flags) 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); @@ -940,7 +940,7 @@ nvlist_recv(int sock, int flags) 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601030740.u037eBti098539>