diff --git a/src/CFGFileParser.cpp b/src/CFGFileParser.cpp index d96c755..17edfcc 100644 --- a/src/CFGFileParser.cpp +++ b/src/CFGFileParser.cpp @@ -9,7 +9,7 @@ CFGFileParser::CFGFileParser(const char* filename){ // the buffer, close the file cfg_file = fopen(filename, "rb"); // On NT, opening in text mode translates \n into \r\n stat(filename, cfg_fileinfo); - buffer = static_cast(tlsf_calloc(cfg_fileinfo->st_size & INT_MAX, sizeof(char) & INT_MAX)); + buffer = static_cast(tlsf_malloc(cfg_fileinfo->st_size & INT_MAX, sizeof(char) & INT_MAX)); cfg = new BrowserConfiguration(); bytesRead = fread(buffer, sizeof(char) & INT_MAX, cfg_fileinfo->st_size & INT_MAX, cfg_file); if (!bytesRead) { @@ -39,7 +39,7 @@ bool CFGFileParser::ParseText() { size_t pass1_length = 0; struct slre regex; // final validation before adding to second-pass buffer // Second pass. All comments and .tags stripped out. Starts off at 512 bytes, increases if necessary. - char* directives = static_cast(tlsf_calloc(512, sizeof(char))); + char* directives = static_cast(tlsf_malloc(512, sizeof(char))); char* tmp2; token = strtok_r(buffer, "\n", &tmp); while (tmp != nullptr) { diff --git a/src/pnm.cpp b/src/pnm.cpp index ade4f3a..b5a5c05 100644 --- a/src/pnm.cpp +++ b/src/pnm.cpp @@ -61,7 +61,7 @@ RGBAPNMObject * readPPM(const char* fileName) { } // allocate array for pixels - char* pixels = reinterpret_cast(tlsf_calloc(size, sizeof(char))); // used to be: new char[size]; + char* pixels = reinterpret_cast(tlsf_malloc(size, sizeof(char))); // used to be: new char[size]; // unformatted read of binary pixel data res = fread(pixels, sizeof(int), size, fr);