summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-13 23:56:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:26 -0500
commitb5c2c5cd2579560eb8d608b3f63b628735ccf3ca (patch)
tree8d57507600739b73470c5f178934f56254779dee /source3
parent846c4520ce102883825e3d2e1adba79a0b45a7d5 (diff)
downloadsamba-b5c2c5cd2579560eb8d608b3f63b628735ccf3ca.tar.gz
samba-b5c2c5cd2579560eb8d608b3f63b628735ccf3ca.tar.bz2
samba-b5c2c5cd2579560eb8d608b3f63b628735ccf3ca.zip
r14357: Try and fix Coverity #169 by making the pointer
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 (This used to be commit b8397c9f33424e0d1ed3ff849e1c99812f978000)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/posix_acls.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 5356d962a2..ca0c51b1ea 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -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);
}
}