This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 5/6] Mention that create_child takes ownership of the allocated name
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Thu, 29 Jan 2015 14:28:35 -0500
- Subject: [PATCH 5/6] Mention that create_child takes ownership of the allocated name
- Authentication-results: sourceware.org; auth=none
- References: <1422559716-5480-1-git-send-email-simon dot marchi at ericsson dot com>
gdb/ChangeLog:
* varobj.c (create_child): Modify comment.
---
gdb/varobj.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 0daef91..d3fa1ba 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2043,7 +2043,9 @@ uninstall_variable (struct varobj *var)
}
-/* Create and install a child of the parent of the given name. */
+/* Create and install a child of the parent of the given name.
+
+ The created VAROBJ takes ownership of the allocated NAME. */
static struct varobj *
create_child (struct varobj *parent, int index, char *name)
{
--
2.1.4