From 1c05ebf522f0bb5776ba51a46d94aa101220fea1 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Thu, 07 Jun 2018 00:39:30 +0000
Subject: [PATCH] Minor fix

---
 src/list.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/list.c b/src/list.c
index 948d960..e83f63e 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1,6 +1,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "list.h"
+#include "option_list.h"
 
 list *make_list()
 {
@@ -11,6 +12,7 @@
 	return l;
 }
 
+/*
 void transfer_node(list *s, list *d, node *n)
 {
     node *prev, *next;
@@ -22,6 +24,7 @@
     if(s->front == n) s->front = next;
     if(s->back == n) s->back = prev;
 }
+*/
 
 void *list_pop(list *l){
     if(!l->back) return 0;
@@ -77,6 +80,17 @@
 	}
 }
 
+void free_list_contents_kvp(list *l)
+{
+	node *n = l->front;
+	while (n) {
+		kvp *p = n->val;
+		free(p->key);
+		free(n->val);
+		n = n->next;
+	}
+}
+
 void **list_to_array(list *l)
 {
     void **a = calloc(l->size, sizeof(void*));

--
Gitblit v1.10.0