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));
   }