forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user