Buffer: Correctly disenroll buffer to avoid memory leaks

After pa/1974512 is in, one buffer can be enrolled several times
buffer is identified by vaddr. So when buffer->enrollment_list->list
is empty, we should delete the hashmap node because there is no buffer
enrollment anymore. Otherwise, if it's not empty, we need to keep the
buffer node.
The real buffer leakage is we didn't free the enrollment_list
has been allocated.
Add kfree(buffer->enrollment_list) into buffer disenrollment to
fix memory leakage.

Bug: 199806521
Test: kmemleak_analyze.py, CTS, GCA
Signed-off-by: Nick Chung <nickchung@google.com>
Change-Id: Id5904cff1f7f6d6392ff203e144479be7df1c73f
(cherry picked from commit ab45d0cda10ab5aa70616b96b0db26295ab606ad)
diff --git a/lwis_buffer.c b/lwis_buffer.c
index 370b079..77f1754 100644
--- a/lwis_buffer.c
+++ b/lwis_buffer.c
@@ -247,8 +247,9 @@
 	dma_buf_put(buffer->dma_buf);
 	/* Delete the node from the hash table */
 	list_del(&buffer->list_node);
-	if (!list_empty(&buffer->enrollment_list->list)) {
+	if (list_empty(&buffer->enrollment_list->list)) {
 		hash_del(&buffer->enrollment_list->node);
+		kfree(buffer->enrollment_list);
 	}
 	return 0;
 }
@@ -305,7 +306,6 @@
 			/* Free the object */
 			kfree(buffer);
 		}
-		kfree(enrollment_list);
 	}
 
 	return 0;