[Lldb-commits] [PATCH] D32585: Implementation of remote packets for Trace data.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 26 13:45:02 PDT 2017


clayborg added inline comments.


================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:1304
+  // Allocate the response buffer.
+  uint8_t *buffer = new (std::nothrow) uint8_t[byte_count];
+  if (buffer == nullptr)
----------------
labath wrote:
> Hey, ravi. You're leaking memory here. Please put this in a `std::unique_ptr<uint8_t[]>` so we make sure it get's cleaned up. (No need to request formal review)
use std::vector, I agree with Zach


https://reviews.llvm.org/D32585





More information about the lldb-commits mailing list