r14357: Try and fix Coverity #169 by making the pointer
authorJeremy Allison <jra@samba.org>
Mon, 13 Mar 2006 23:56:02 +0000 (23:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:26 +0000 (11:15 -0500)
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.
 line, and those below, will be ignored--

M    source/smbd/posix_acls.c

source/smbd/posix_acls.c

index 5356d962a23646caa3d52c8ee652517aca482bad..ca0c51b1ea9b1948fe52fc8ce7261da4ac619737 100644 (file)
@@ -516,10 +516,12 @@ static size_t count_canon_ace_list( canon_ace *list_head )
 
 static void free_canon_ace_list( canon_ace *list_head )
 {
-       while (list_head) {
-               canon_ace *old_head = list_head;
-               DLIST_REMOVE(list_head, list_head);
-               SAFE_FREE(old_head);
+       canon_ace *list, *next;
+
+       for (list = list_head; list; list = next) {
+               next = list->next;
+               DLIST_REMOVE(list_head, list);
+               SAFE_FREE(list);
        }
 }