summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Util.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-30 18:03:47 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-30 18:03:47 +0000
commit98157cb50455bac3a83780287f764ac9ffbaff3d (patch)
tree18df4c0087dddd996be220d8b392973b1e5edb6b /cpp/src/IcePatch2/Util.cpp
parentNew login/logout icons (diff)
downloadice-98157cb50455bac3a83780287f764ac9ffbaff3d.tar.bz2
ice-98157cb50455bac3a83780287f764ac9ffbaff3d.tar.xz
ice-98157cb50455bac3a83780287f764ac9ffbaff3d.zip
Fixed SunOS compile issues
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r--cpp/src/IcePatch2/Util.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index fc59fd6393e..6d50e29f14c 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -64,6 +64,7 @@ scandir(const char* dir, struct dirent*** namelist,
*namelist = (struct dirent**)realloc((void*)(*namelist), (size_t)((i + 1) * sizeof(struct dirent*)));
if(*namelist == 0)
{
+ closedir(d);
return -1;
}
@@ -71,6 +72,7 @@ scandir(const char* dir, struct dirent*** namelist,
(*namelist)[i] = (struct dirent*)malloc(entrysize);
if((*namelist)[i] == 0)
{
+ closedir(d);
return -1;
}
memcpy((*namelist)[i], entry, entrysize);