From 8c0163b5a52ca0d902db207edea9fe932fcb7ef8 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 14 Oct 2005 06:22:27 +0000
Subject: [PATCH] Created listFreeStringList() used to free a string list
 returned from list[Sub]StringList().

---
 src/xpdev/link_list.c | 6 ++++++
 src/xpdev/link_list.h | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/xpdev/link_list.c b/src/xpdev/link_list.c
index ea89bb8bd1..1c4dc7dd04 100644
--- a/src/xpdev/link_list.c
+++ b/src/xpdev/link_list.c
@@ -327,6 +327,12 @@ str_list_t listSubStringList(const list_node_t* node, long max)
 	return(str_list);
 }
 
+void* listFreeStringList(str_list_t list)
+{
+	strListFree(&list);
+	return(list);
+}
+
 DLLEXPORT list_node_t* DLLCALL listFirstNode(const link_list_t* list)
 {
 	if(list==NULL)
diff --git a/src/xpdev/link_list.h b/src/xpdev/link_list.h
index 9c69c20166..529471ce62 100644
--- a/src/xpdev/link_list.h
+++ b/src/xpdev/link_list.h
@@ -8,7 +8,7 @@
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
  *																			*
- * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html		*
+ * Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html		*
  *																			*
  * This library is free software; you can redistribute it and/or			*
  * modify it under the terms of the GNU Lesser General Public License		*
@@ -117,6 +117,9 @@ str_list_t		listStringList(const link_list_t*);
 /* Return an allocated string list (which must be freed), subset of strings in linked list */
 str_list_t		listSubStringList(const list_node_t*, long max);
 
+/* Free a string list returned from either of the above functions */
+void*			listFreeStringList(str_list_t);
+
 /* Extract subset (up to max number of nodes) in linked list (src_node) and place into dest_list */
 /* dest_list == NULL, then allocate a return a new linked list */
 DLLEXPORT link_list_t*	DLLCALL	listExtract(link_list_t* dest_list, const list_node_t* src_node, long max);
-- 
GitLab