Update minifiercompetition.cpp (#1353)

as described in the description for the allocate_padded_buffer function: // The caller is responsible to free the memory (e.g., delete [] (...)).
but your code used the function free.
I propose to fix this error.
This commit is contained in:
ihsinme 2020-12-23 00:50:37 +03:00 committed by GitHub
parent 5f92cd2b00
commit a72cb8a37a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ int main(int argc, char *argv[]) {
simdjson::SUCCESS, memcpy(buffer, mini_buffer, p.size()), repeat, volume,
!just_data);
free(buffer);
delete [] buffer;
free(ast_buffer);
free(mini_buffer);
delete [] mini_buffer;
}