Free results of varobj_get_expression
authorSimon Marchi <simon.marchi@ericsson.com>
Fri, 30 Jan 2015 18:56:56 +0000 (13:56 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 30 Jan 2015 18:56:56 +0000 (13:56 -0500)
commitca83fa81892ab61870295cb5397c59daff1a55e0
treed29019a8622926923a68441ce64497cbacfb32dc
parentafa269ae41673cd5cc5f50d683a0f2d275a643e8
Free results of varobj_get_expression

varobj_get_expression returns an allocated string, which must be freed
by the caller.

gdb/ChangeLog:

* mi-cmd-var.c (print_varobj): Free varobj_get_expression
result.
(mi_cmd_var_info_expression): Same.
* varobj.c (varobj_get_expression): Mention in the comment that
the result must by freed by the caller.
gdb/ChangeLog
gdb/mi/mi-cmd-var.c
gdb/varobj.c