Or just use a std vector
On Fri, May 26, 2017 at 7:00 AM Pavel Labath via Phabricator <
revi...@reviews.llvm.org> wrote:

> labath 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)
> ----------------
> 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)
>
>
> https://reviews.llvm.org/D32585
>
>
>
>
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to