Commit bb817900 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

test/nvme_impl.h: restore posix_memalign() check



If posix_memalign() fails, it may not have updated buf, so set it to
NULL explicitly.

Change-Id: I756bdc59ec1e31987ad3e6754eec4e2194b95074
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 372942e5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -151,7 +151,9 @@ nvme_mempool_create(const char *name, unsigned n, unsigned elt_size,
static inline void
nvme_mempool_get(nvme_mempool_t *mp, void **buf)
{
	posix_memalign(buf, 64, 0x1000);
	if (posix_memalign(buf, 64, 0x1000)) {
		*buf = NULL;
	}
}

static inline void