svn commit: r293082 - user/ngie/stable-10-libnv/sys/kern
Garrett Cooper
ngie at FreeBSD.org
Sun Jan 3 07:40:12 UTC 2016
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)
More information about the svn-src-user
mailing list