From 819847b53a3a535d909677d3a1a89c2dfe89bd4b Mon Sep 17 00:00:00 2001
From: Shane Bryldt <astaelan@gmail.com>
Date: Tue, 11 Apr 2017 15:51:35 -0500
Subject: [PATCH] FS-10167: Missing NULL assignment to alloc list during
 cleanup, tests run on linux.

---
 libs/libks/src/ks_pool.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libs/libks/src/ks_pool.c b/libs/libks/src/ks_pool.c
index 905afdf030..b9b9fc69e7 100644
--- a/libs/libks/src/ks_pool.c
+++ b/libs/libks/src/ks_pool.c
@@ -305,7 +305,7 @@ static void *alloc_mem(ks_pool_t *pool, const ks_size_t size, ks_status_t *error
 	prefix->magic4 = KS_POOL_PREFIX_MAGIC;
 
 	write_fence(fence);
-	
+
 	if (pool->log_func != NULL) {
 		pool->log_func(pool, KS_POOL_FUNC_INCREF, prefix->size, prefix->refs, NULL, addr, 0);
 	}
@@ -456,7 +456,7 @@ KS_DECLARE(ks_status_t) ks_pool_open(ks_pool_t **poolP)
 {
 	ks_status_t ret = KS_STATUS_SUCCESS;
 	ks_pool_t *pool = NULL;
-	
+
 	ks_assert(poolP);
 
 	pool = ks_pool_raw_open(KS_POOL_FLAG_DEFAULT, &ret);
@@ -576,6 +576,7 @@ KS_DECLARE(ks_status_t) ks_pool_clear(ks_pool_t *pool)
 		// @todo check_prefix()? still want to clear out properly if some has been cleared though, not leak memory if there has been corruption
 		free(prefix);
 	}
+	pool->first = pool->last = NULL;
 
 	ks_mutex_unlock(pool->mutex);
 
@@ -944,7 +945,7 @@ done:
  * DESCRIPTION:
  *
  * Reallocate an address in a mmeory pool to a new size.  This is
- * different from realloc in that it needs the old address' size.  
+ * different from realloc in that it needs the old address' size.
  *
  * RETURNS:
  *