svn commit: samba r14360 - in trunk/source/client: .

jra at samba.org jra at samba.org
Mon Mar 13 23:59:05 GMT 2006


Author: jra
Date: 2006-03-13 23:59:03 +0000 (Mon, 13 Mar 2006)
New Revision: 14360

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14360

Log:
Try and fix Coverity #176 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.

Modified:
   trunk/source/client/client.c


Changeset:
Modified: trunk/source/client/client.c
===================================================================
--- trunk/source/client/client.c	2006-03-13 23:58:58 UTC (rev 14359)
+++ trunk/source/client/client.c	2006-03-13 23:59:03 UTC (rev 14360)
@@ -1336,15 +1336,15 @@
  Free a file_list structure.
 ****************************************************************************/
 
-static void free_file_list (struct file_list * list)
+static void free_file_list (struct file_list *list_head)
 {
-	struct file_list *tmp;
+	struct file_list *list, *next;
 	
-	while (list) {
-		tmp = list;
-		DLIST_REMOVE(list, list);
-		SAFE_FREE(tmp->file_path);
-		SAFE_FREE(tmp);
+	for (list = list_head; list; list = next) {
+		next = list->next;
+		DLIST_REMOVE(list_head, list);
+		SAFE_FREE(list->file_path);
+		SAFE_FREE(list);
 	}
 }
 



More information about the samba-cvs mailing list