diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2015-01-30 13:56:56 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2015-01-30 13:56:56 -0500 |
commit | ca83fa81892ab61870295cb5397c59daff1a55e0 (patch) | |
tree | d29019a8622926923a68441ce64497cbacfb32dc /gdb/varobj.c | |
parent | afa269ae41673cd5cc5f50d683a0f2d275a643e8 (diff) | |
download | gdb-ca83fa81892ab61870295cb5397c59daff1a55e0.zip gdb-ca83fa81892ab61870295cb5397c59daff1a55e0.tar.gz gdb-ca83fa81892ab61870295cb5397c59daff1a55e0.tar.bz2 |
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.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index dad284d..6c9257d 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -492,7 +492,8 @@ varobj_get_objname (struct varobj *var) return var->obj_name; } -/* Given the handle, return the expression represented by the object. */ +/* Given the handle, return the expression represented by the object. The + result must be freed by the caller. */ char * varobj_get_expression (struct varobj *var) |