fixed a bug

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@142 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2002-07-12 17:47:38 +00:00
parent e5dc2d93a3
commit 5667d23a37
+3 -1
View File
@@ -431,8 +431,10 @@ static int recurse_directory(const char *path, const char *match)
return -1;
dirent = kmalloc(bufferSize);
if (!dirent)
if (!dirent) {
sys_close(dir);
return -1;
}
/* loop until we have a match or we run out of entries */
while (res <= 0) {