celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject svn commit: r1600208 - /incubator/celix/trunk/utils/private/src/linked_list.c
Date Wed, 04 Jun 2014 13:46:18 GMT
Author: pnoltes
Date: Wed Jun  4 13:46:18 2014
New Revision: 1600208

URL: http://svn.apache.org/r1600208
Log:
CELIX-119: Fixed bug in linkedList_destroy

Modified:
    incubator/celix/trunk/utils/private/src/linked_list.c

Modified: incubator/celix/trunk/utils/private/src/linked_list.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/src/linked_list.c?rev=1600208&r1=1600207&r2=1600208&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/src/linked_list.c (original)
+++ incubator/celix/trunk/utils/private/src/linked_list.c Wed Jun  4 13:46:18 2014
@@ -56,16 +56,15 @@ UTILS_EXPORT celix_status_t linkedList_d
 	linked_list_entry_pt current = NULL;
 	linked_list_entry_pt next = NULL;
 
-	current = list->header;
-	list->header = NULL;
-	list->size = 0;
+	current = list->header->next;
 
-	while (current != NULL) {
+	while (current != list->header) {
 		next = current->next;
 		free(current);
 		current = next;
 	}
 
+	free(list->header);
 	free(list);
 
 	return status;



Mime
View raw message