diff --git a/lib/datastruct/kvpair.c b/lib/datastruct/kvpair.c index 87743a1d..9db56b02 100644 --- a/lib/datastruct/kvpair.c +++ b/lib/datastruct/kvpair.c @@ -1,3 +1,4 @@ +#include #include #include "kvldskey.h" @@ -45,6 +46,9 @@ void kvpair_sort(struct kvpair * pairs, size_t npairs, size_t mlen) { + /* Sanity check. */ + assert(pairs != NULL); + /* See above comments about cookie_mlen and non-threadsafety. */ cookie_mlen = mlen;