Re: [PATCH v2 28/31] Use ui_file_as_string throughout more

Pedro Alves
2017-02-23T10:53:46Z

On 02/23/2017 10:22 AM, Yao Qi wrote:

>>
>> /* Value of this item. */
>> struct value *value;
>> @@ -67,6 +67,6 @@ struct varobj_iter_ops
>> if ((ITER) != NULL) \
>> { \
>> (ITER)->ops->dtor (ITER); \
>> - xfree (ITER); \
>> + delete (ITER); \
>
> We don't need to use "delete" for varobj_iter, because you didn't add
> std::string member in varobj_iter. This change causes an ASAN error,

Whoops.

> reverting the change above fixes the error. We can also C++-fy
> varobj_iter, but I'd like to do in another patch. How is the patch below?

LGTM.

Thanks,
Pedro Alves