diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-28 20:20:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-28 23:25:13 +0300 |
commit | 75a5173176adfc4bc417c10df137d9ea8d90d403 (patch) | |
tree | 2d095e72f084ff96ee5ce3608453d98da0eda5d7 /src/fs/files.cpp | |
parent | b6831b3b3053b1777402a35d8b3ae3cca2f62bc4 (diff) | |
download | mv-75a5173176adfc4bc417c10df137d9ea8d90d403.tar.gz mv-75a5173176adfc4bc417c10df137d9ea8d90d403.tar.bz2 mv-75a5173176adfc4bc417c10df137d9ea8d90d403.tar.xz mv-75a5173176adfc4bc417c10df137d9ea8d90d403.zip |
Change memory allocation in Virtfs::LoadFile from calloc to new.
Diffstat (limited to 'src/fs/files.cpp')
-rw-r--r-- | src/fs/files.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/files.cpp b/src/fs/files.cpp index 91433e287..fa9fe2de3 100644 --- a/src/fs/files.cpp +++ b/src/fs/files.cpp @@ -91,11 +91,11 @@ void Files::copyVirtFsFile(const std::string &restrict inFile, const std::string &restrict outFile) { int size = 0; - void *const buf = VirtFs::loadFile(inFile, size); + char *const buf = VirtFs::loadFile(inFile, size); FILE *const file = fopen(outFile.c_str(), "w"); fwrite(buf, 1, size, file); fclose(file); - free(buf); + delete [] buf; #ifdef ANDROID if (mCallbackPtr) { |