diff options
author | ru <ru@FreeBSD.org> | 2012-03-02 14:05:50 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2012-03-02 14:05:50 +0000 |
commit | 2cfd87717af00101b0095d9fcc4fada0b79bce0b (patch) | |
tree | bcf98aa3a1d8f529820b60a04f45a5e2fbfd6e9f /crypto/openssh/kexdhs.c | |
parent | 7ee846fb9d134b670e5ea6706ff5236548918d47 (diff) | |
download | FreeBSD-src-2cfd87717af00101b0095d9fcc4fada0b79bce0b.zip FreeBSD-src-2cfd87717af00101b0095d9fcc4fada0b79bce0b.tar.gz |
Removed excessive _seekdir() call in closedir(). This saves one lseek()
syscall. Before r5958, seekdir() was called for its side effect of
freeing memory allocated by opendir() for rewinddir(), but that revision
added _reclaim_telldir() that frees all memory allocated by telldir()
calls, making this call redundant.
This introduces a slight change. If an application duplicated the descriptor
obtained through dirfd(), it can no longer rely on file position to be
reset to the start of file after a call to closedir(). It's believed to
be safe because neither POSIX, nor any other OS I've tested (NetBSD, Linux,
OS X) rewind the file offset pointer on closedir().
Reported by: Igor Sysoev
Diffstat (limited to 'crypto/openssh/kexdhs.c')
0 files changed, 0 insertions, 0 deletions