projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88862d3
)
Add missing closedir() in readdir() (dotnet/core-setup#5761)
author
Omair Majid
<omajid@redhat.com>
Wed, 10 Apr 2019 19:59:37 +0000
(15:59 -0400)
committer
Vitek Karas
<vitek.karas@microsoft.com>
Wed, 10 Apr 2019 19:59:37 +0000
(12:59 -0700)
The readdir function calls opendir() but never closedir(), leaking the
DIR resource.
Commit migrated from https://github.com/dotnet/core-setup/commit/
ad2e0c415a04e47be4343cc1e956166bfd244632
src/installer/corehost/common/pal.unix.cpp
patch
|
blob
|
history
diff --git
a/src/installer/corehost/common/pal.unix.cpp
b/src/installer/corehost/common/pal.unix.cpp
index
5b5c42f
..
e0701d3
100644
(file)
--- a/
src/installer/corehost/common/pal.unix.cpp
+++ b/
src/installer/corehost/common/pal.unix.cpp
@@
-647,6
+647,8
@@
static void readdir(const pal::string_t& path, const pal::string_t& pattern, boo
files.push_back(filepath);
}
}
+
+ closedir(dir);
}
}