Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/hash/hashhl.c,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/hash/hashhl.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.3 retrieving revision 1.4 diff -u -p -r1.3 -r1.4 --- src/lib/libc/hash/hashhl.c 2009/03/06 18:15:23 1.3 +++ src/lib/libc/hash/hashhl.c 2010/01/17 23:10:20 1.4 @@ -1,4 +1,4 @@ -/* $NetBSD: hashhl.c,v 1.3 2009/03/06 18:15:23 apb Exp $ */ +/* $NetBSD: hashhl.c,v 1.4 2010/01/17 23:10:20 wiz Exp $ */ /* * ---------------------------------------------------------------------------- @@ -106,8 +106,10 @@ FNPREFIX(FileChunk)(const char *filename } len = sb.st_size; } - if (off > 0 && lseek(fd, off, SEEK_SET) < 0) + if (off > 0 && lseek(fd, off, SEEK_SET) < 0) { + close(fd); return (NULL); + } while ((nr = read(fd, buffer, (size_t) MIN((off_t)sizeof(buffer), len))) > 0) {