diff options
author | thestig <thestig@chromium.org> | 2016-06-27 09:47:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-27 09:47:59 -0700 |
commit | c08cd7abb2069b6056ec99c8ec5b87524e45df01 (patch) | |
tree | a1b919599cd5f3f23aeb9834aff5b6d21c7549ec /samples/pdfium_test.cc | |
parent | dff03da3d403b72098d5d43ea90b03ed340de5ec (diff) | |
download | pdfium-c08cd7abb2069b6056ec99c8ec5b87524e45df01.tar.xz |
Fix memory leaks with V8 startup data.
Review-Url: https://codereview.chromium.org/2068563002
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r-- | samples/pdfium_test.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index 7651205738..f244d8a440 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -882,6 +882,11 @@ int main(int argc, const char* argv[]) { #ifdef PDF_ENABLE_V8 v8::V8::ShutdownPlatform(); delete platform; + +#ifdef V8_USE_EXTERNAL_STARTUP_DATA + free(const_cast<char*>(natives.data)); + free(const_cast<char*>(snapshot.data)); +#endif // V8_USE_EXTERNAL_STARTUP_DATA #endif // PDF_ENABLE_V8 return 0; |