X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/samples/ugrep/ugrep.cpp?ds=inline diff --git a/icuSources/samples/ugrep/ugrep.cpp b/icuSources/samples/ugrep/ugrep.cpp index 0eeba680..4f920137 100644 --- a/icuSources/samples/ugrep/ugrep.cpp +++ b/icuSources/samples/ugrep/ugrep.cpp @@ -1,6 +1,6 @@ /************************************************************************** * -* Copyright (C) 2002, International Business Machines +* Copyright (C) 2002-2010, International Business Machines * Corporation and others. All Rights Reserved. * *************************************************************************** @@ -287,6 +287,7 @@ void readFile(const char *name) { int t = fread(charBuf, 1, rawFileLen, file); if (t != rawFileLen) { fprintf(stderr, "Error reading file \"%s\"\n", fileName); + fclose(file); return; } charBuf[rawFileLen]=0;