svn commit: r314504 - head/sys/boot/zfs
Toomas Soome
tsoome at FreeBSD.org
Wed Mar 1 19:02:45 UTC 2017
Author: tsoome
Date: Wed Mar 1 19:02:43 2017
New Revision: 314504
URL: https://svnweb.freebsd.org/changeset/base/314504
Log:
loader: r314112 did introduce dereference freed pointer entry
CID: 1371675
Reported by: Coverity
Reviewed by: jhb, allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9846
Modified:
head/sys/boot/zfs/zfsimpl.c
Modified: head/sys/boot/zfs/zfsimpl.c
==============================================================================
--- head/sys/boot/zfs/zfsimpl.c Wed Mar 1 18:53:05 2017 (r314503)
+++ head/sys/boot/zfs/zfsimpl.c Wed Mar 1 19:02:43 2017 (r314504)
@@ -2334,7 +2334,7 @@ zfs_lookup(const struct zfsmount *mount,
char path[1024];
int symlinks_followed = 0;
struct stat sb;
- struct obj_list *entry;
+ struct obj_list *entry, *tentry;
STAILQ_HEAD(, obj_list) on_cache = STAILQ_HEAD_INITIALIZER(on_cache);
spa = mount->spa;
@@ -2482,7 +2482,7 @@ zfs_lookup(const struct zfsmount *mount,
*dnode = dn;
done:
- STAILQ_FOREACH(entry, &on_cache, entry)
+ STAILQ_FOREACH_SAFE(entry, &on_cache, entry, tentry)
free(entry);
return (rc);
}
More information about the svn-src-all
mailing list