aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2015-01-30 13:56:56 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2015-01-30 13:56:56 -0500
commitca83fa81892ab61870295cb5397c59daff1a55e0 (patch)
treed29019a8622926923a68441ce64497cbacfb32dc /gdb/varobj.c
parentafa269ae41673cd5cc5f50d683a0f2d275a643e8 (diff)
downloadgdb-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.c3
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)