Fix a incorrect memory size allocation.