| commit | c30b0a434de9d5e9f2512871cb1395d7c41aaf4f | [log] [tgz] |
|---|---|---|
| author | Tom Sepez <tsepez@chromium.org> | Thu Jan 24 19:32:30 2019 +0000 |
| committer | Chromium commit bot <commit-bot@chromium.org> | Thu Jan 24 19:32:30 2019 +0000 |
| tree | fed1555ca8fb0d92b539495975d5c0655419af49 | |
| parent | 13a5f9e46a5d24b65dc3593cd9972b508a9b75f7 [diff] |
Release before reallocation in cfx_memorystream.cpp Bug: chromium:924928 Change-Id: Iad053694d4139414775527dc94fb003b040f51de Reviewed-on: https://pdfium-review.googlesource.com/c/48830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/cfx_memorystream.cpp b/core/fxcrt/cfx_memorystream.cpp index 05899ec..b1f131e 100644 --- a/core/fxcrt/cfx_memorystream.cpp +++ b/core/fxcrt/cfx_memorystream.cpp
@@ -89,7 +89,7 @@ m_nTotalSize = new_size.ValueOrDie(); if (m_data) - m_data.reset(FX_Realloc(uint8_t, m_data.get(), m_nTotalSize)); + m_data.reset(FX_Realloc(uint8_t, m_data.release(), m_nTotalSize)); else m_data.reset(FX_Alloc(uint8_t, m_nTotalSize)); }