Always use the nv_malloc macro instead of malloc(3).

Approved by:	pjd (mentor)
This commit is contained in:
Mariusz Zaborski 2015-04-29 21:54:34 +00:00
parent 906289c2ec
commit 003e3ea15b

View File

@ -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)