summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2016-05-23 07:21:01 +0000
committeravg <avg@FreeBSD.org>2016-05-23 07:21:01 +0000
commitc8d002b120ab2c4766cdf04ebd8fde0e53766b85 (patch)
treefa4693872f5d4b1b296a85c05c9deb2ec8d4e6f1 /sys/kern
parent91eaa1e181e7464745c264f0c48a627c61ce462d (diff)
downloadFreeBSD-src-c8d002b120ab2c4766cdf04ebd8fde0e53766b85.zip
FreeBSD-src-c8d002b120ab2c4766cdf04ebd8fde0e53766b85.tar.gz
MFC r299916: vfs_read_dirent: increment ncookies after adding a cookie
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_subr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 674876d..a137217 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -4777,6 +4777,7 @@ vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off)
*ap->a_cookies = realloc(*ap->a_cookies,
(*ap->a_ncookies + 1) * sizeof(u_long), M_TEMP, M_WAITOK | M_ZERO);
(*ap->a_cookies)[*ap->a_ncookies] = off;
+ *ap->a_ncookies += 1;
return (0);
}
OpenPOWER on IntegriCloud