fixed a bug
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@142 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user