diff options
author | Renato Botelho <renato@netgate.com> | 2016-02-24 07:51:32 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-02-24 07:51:32 -0300 |
commit | b15d3cfa0625b6816b5b55df864fbda78dc2add8 (patch) | |
tree | c384e7235e9894678587ee5782698526bdcc340e /sys/fs/tmpfs/tmpfs_vnops.c | |
parent | 7c17fc70241a215de420457e10a510834441b90f (diff) | |
parent | 008df39fd8f9ba2311709c852fa30e39bf891bcf (diff) | |
download | FreeBSD-src-b15d3cfa0625b6816b5b55df864fbda78dc2add8.zip FreeBSD-src-b15d3cfa0625b6816b5b55df864fbda78dc2add8.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_vnops.c')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 885f84c..f01c8be 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -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 = |