diff options
author | David Greenman <dg@FreeBSD.org> | 1995-01-09 04:50:30 +0000 |
---|---|---|
committer | David Greenman <dg@FreeBSD.org> | 1995-01-09 04:50:30 +0000 |
commit | cfc22f90268457ebcf2d169b2c29ac03e9bc33ca (patch) | |
tree | 8e382de379a6fc22f26cd2ee6db5936686563f0a /usr.bin | |
parent | 10824ac8f3a6f3b54c529e9d19e7877d5562f250 (diff) | |
download | src-cfc22f90268457ebcf2d169b2c29ac03e9bc33ca.tar.gz src-cfc22f90268457ebcf2d169b2c29ac03e9bc33ca.zip |
Old fix from Robert Crowe <bob@speakez.com> that has been sitting in
my mailbox since early last year. Fixes a problem with running out of
fds (by hitting the limit or whatever) when ar is given a long list of
objects. The fix was to add a missing close().
Submitted by: Robert Crowe <bob@speakez.com>
Notes
Notes:
svn path=/head/; revision=5447
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ar/replace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ar/replace.c b/usr.bin/ar/replace.c index cc12781764e8..11cdfd07b131 100644 --- a/usr.bin/ar/replace.c +++ b/usr.bin/ar/replace.c @@ -102,8 +102,10 @@ replace(argv) goto useold; } (void)fstat(sfd, &sb); - if (options & AR_U && sb.st_mtime <= chdr.date) + if (options & AR_U && sb.st_mtime <= chdr.date) { + (void) close(sfd); goto useold; + } if (options & AR_V) (void)printf("r - %s\n", file); |