svn commit: r295897 - stable/10/sys/fs/tmpfs
Mark Johnston
markj at FreeBSD.org
Mon Feb 22 20:18:34 UTC 2016
Author: markj
Date: Mon Feb 22 20:18:10 2016
New Revision: 295897
URL: https://svnweb.freebsd.org/changeset/base/295897
Log:
MFC r295574:
Clear the cookie pointer on error in tmpfs_readdir().
Approved by: re (glebius)
Modified:
stable/10/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c
==============================================================================
--- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Mon Feb 22 19:17:59 2016 (r295896)
+++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Mon Feb 22 20:18:10 2016 (r295897)
@@ -1187,8 +1187,11 @@ tmpfs_readdir(struct vop_readdir_args *v
if (error == EJUSTRETURN)
error = (uio->uio_resid != startresid) ? 0 : EINVAL;
- if (error != 0 && cookies != NULL)
+ if (error != 0 && cookies != NULL && ncookies != NULL) {
free(*cookies, M_TEMP);
+ *cookies = NULL;
+ *ncookies = 0;
+ }
if (eofflag != NULL)
*eofflag =
More information about the svn-src-all
mailing list