summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/file
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-11-11 14:34:46 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-11-11 16:12:01 +0100
commit7c765ea14785a4ad6efd2e30e03447f354bed6b4 (patch)
tree8c1e3836d1c907378f61bb5748aac4219af68ce4 /src/osd/modules/file
parent5c0edceec3a939ce7804b23beaeebfc700413489 (diff)
No need for osd_malloc, osd_malloc_array and osd_free (nw)
MALLOC_DEBUG not applicable anymore since we use new to allocate in 99.9% of cases
Diffstat (limited to 'src/osd/modules/file')
-rw-r--r--src/osd/modules/file/posixfile.cpp2
-rw-r--r--src/osd/modules/file/stdfile.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp
index 5b90e43a57c..3cc122342dd 100644
--- a/src/osd/modules/file/posixfile.cpp
+++ b/src/osd/modules/file/posixfile.cpp
@@ -276,7 +276,7 @@ osd_file::error osd_file::open(std::string const &path, std::uint32_t openflags,
}
}
- // if we still failed, clean up and osd_free
+ // if we still failed, clean up and free
if (fd < 0)
{
return errno_to_file_error(errno);
diff --git a/src/osd/modules/file/stdfile.cpp b/src/osd/modules/file/stdfile.cpp
index 611775ab0ba..cb1f1b536b2 100644
--- a/src/osd/modules/file/stdfile.cpp
+++ b/src/osd/modules/file/stdfile.cpp
@@ -197,7 +197,7 @@ osd_directory_entry *osd_stat(const std::string &path)
// create an osd_directory_entry; be sure to make sure that the caller can
// free all resources by just freeing the resulting osd_directory_entry
- result = (osd_directory_entry *)osd_malloc_array(sizeof(*result) + path.length() + 1);
+ result = (osd_directory_entry *)malloc(sizeof(*result) + path.length() + 1);
strcpy((char *)(result + 1), path.c_str());
result->name = (char *)(result + 1);
result->type = ENTTYPE_NONE;