Fix a GetFileContents() call that should have been in commit aa326bd6. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1568763003 .
diff --git a/testing/test_support.cpp b/testing/test_support.cpp index ce143ae..96e01c5 100644 --- a/testing/test_support.cpp +++ b/testing/test_support.cpp
@@ -45,11 +45,12 @@ std::string full_path = GetFullPathForSnapshotFile(exe_path, bin_dir, filename); size_t data_length = 0; - char* data_buffer = GetFileContents(full_path.c_str(), &data_length); - if (!data_buffer) { + std::unique_ptr<char, pdfium::FreeDeleter> data_buffer = + GetFileContents(full_path.c_str(), &data_length); + if (!data_buffer) return false; - } - result_data->data = const_cast<const char*>(data_buffer); + + result_data->data = data_buffer.release(); result_data->raw_size = data_length; return true; }