r207076 - Fix two leaks found by LSan.

Chandler Carruth chandlerc at google.com
Wed Apr 23 22:39:15 PDT 2014


On Wed, Apr 23, 2014 at 10:16 PM, Nico Weber <nicolasweber at gmx.de> wrote:

> +        if (DidSetDeprecatedMessage)
> +          clang_disposeString(*deprecated_message);
>          *deprecated_message =
> cxstring::createDup(Deprecated->getMessage());
> +        DidSetDeprecatedMessage = true;
>

Can we really not tell that the message doesn't hold a string to dispose
of? Maybe even better, have clang_disposeString just no-op in that case
(the way free, delete, etc do)?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140423/de4b46e3/attachment.html>


More information about the cfe-commits mailing list