Or just use a std vector <br><div class="gmail_quote"><div dir="ltr">On Fri, May 26, 2017 at 7:00 AM Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added inline comments.<br>
<br>
<br>
================<br>
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:1304<br>
+  // Allocate the response buffer.<br>
+  uint8_t *buffer = new (std::nothrow) uint8_t[byte_count];<br>
+  if (buffer == nullptr)<br>
----------------<br>
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)<br>
<br>
<br>
<a href="https://reviews.llvm.org/D32585" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32585</a><br>
<br>
<br>
<br>
</blockquote></div>