freebsd-dev/lib/libnv
Ryan Stone ed007c94ba Don't allocate memory for operations that do not insert
Almost every operation performed on an nvlist was allocating a
new string to hold the key name.  The nvlist_exists* family of
functions would always return false if they failed to allocate
the string.  The rest of the functions would outright abort().
Fix the non-varargs variants of the functions to perform the
requested operations directly and the varargs versions to
allocate the string and call into the non-varargs versions.
The varargs versions are still broken and really can't be fixed,
so we might consider axing them entirely.  However, now the non-
varargs functions are always safe to call.

Differential Revision:		https://reviews.freebsd.org/D1879
Reviewed by:			pjd, jfv
MFC after:			1 month
Sponsored by:			Sandvine Inc.
2015-03-01 00:22:31 +00:00
..
tests Add function to force an nvlist into the error state 2015-03-01 00:22:23 +00:00
common_impl.h
dnv.h Make libnv headers includable from C++ 2015-03-01 00:01:36 +00:00
dnvlist.c Don't allocate memory for operations that do not insert 2015-03-01 00:22:31 +00:00
Makefile Add function to force an nvlist into the error state 2015-03-01 00:22:23 +00:00
msgio.c Remove the limit on descriptors that can be send in one nvlist. 2014-09-14 09:27:12 +00:00
msgio.h MFp4 @1189139: 2013-12-15 22:58:09 +00:00
nv_impl.h Don't allocate memory for operations that do not insert 2015-03-01 00:22:31 +00:00
nv.3 Add function to force an nvlist into the error state 2015-03-01 00:22:23 +00:00
nv.h Add function to force an nvlist into the error state 2015-03-01 00:22:23 +00:00
nvlist_impl.h Fix problem on big endian systems introduced in r271579 - when we were 2014-10-09 20:55:05 +00:00
nvlist.c Don't allocate memory for operations that do not insert 2015-03-01 00:22:31 +00:00
nvpair_impl.h Fix problem on big endian systems introduced in r271579 - when we were 2014-10-09 20:55:05 +00:00
nvpair.c If moving descriptor or binary data to an nvlist fails, we need to close the 2015-01-30 09:44:29 +00:00