From 75a5173176adfc4bc417c10df137d9ea8d90d403 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 28 Mar 2017 20:20:54 +0300 Subject: Change memory allocation in Virtfs::LoadFile from calloc to new. --- src/utils/translation/poparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils/translation/poparser.cpp') diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp index a24b62343..ce317f185 100644 --- a/src/utils/translation/poparser.cpp +++ b/src/utils/translation/poparser.cpp @@ -47,12 +47,12 @@ PoParser::PoParser() : void PoParser::openFile(const std::string &name) { int size; - char *buf = static_cast(VirtFs::loadFile(getFileName(name), size)); + char *buf = VirtFs::loadFile(getFileName(name), size); if (buf) { mFile.str(std::string(buf, size)); - free(buf); + delete [] buf; } else { -- cgit v1.2.3-70-g09d2