=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sdiff/sdiff.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/sdiff/sdiff.c 2009/06/07 12:39:40 1.24 --- src/usr.bin/sdiff/sdiff.c 2009/06/07 13:06:02 1.25 *************** *** 1,4 **** ! /* $OpenBSD: sdiff.c,v 1.24 2009/06/07 12:39:40 ray Exp $ */ /* * Written by Raymond Lai . --- 1,4 ---- ! /* $OpenBSD: sdiff.c,v 1.25 2009/06/07 13:06:02 ray Exp $ */ /* * Written by Raymond Lai . *************** *** 109,116 **** err(2, "error getting file status from %s", source_file); /* Regular file. */ ! if (S_ISREG(sb.st_mode)) return (NULL); } else { /* If ``-'' does not exist the user meant stdin. */ if (errno == ENOENT && strcmp(source_file, "-") == 0) --- 109,118 ---- err(2, "error getting file status from %s", source_file); /* Regular file. */ ! if (S_ISREG(sb.st_mode)) { ! close(ifd); return (NULL); + } } else { /* If ``-'' does not exist the user meant stdin. */ if (errno == ENOENT && strcmp(source_file, "-") == 0)