fstrace: Avoid accessing icl log after zapping it
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 19 Feb 2013 17:15:42 +0000 (17:15 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 24 Feb 2013 19:12:40 +0000 (11:12 -0800)
commitc457b106f14086bc1e0feab2eb8e27a3bcb87213
tree7c0bf71dd7b01fa34e77f2e3bd7eabf3676c8019
parentd02757985de45b66e2d291d07918dffae15319a2
fstrace: Avoid accessing icl log after zapping it

The for loop in icl_EnumerateLogs looks up the next pointer in the
current entry after zapping it. Depending on reference counts, this
may result in us looking up freed memory.

Take a copy of the next point before zapping the current entry, just
in case.

Caught by clang-analyzer

Change-Id: If38f0af2b01c5b8ea00e68e4432c6ad5517578c8
Reviewed-on: http://gerrit.openafs.org/9190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/venus/fstrace.c