aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-09-21 16:18:42 +0000
committerTom Tromey <tromey@redhat.com>2009-09-21 16:18:42 +0000
commitce0420dced59a0e1fc114e9bee2117ded5342021 (patch)
tree1eeec572e176a97dc1a4e1af40bb5c3d2e5853d9 /gdb/python
parent943fef64b24885fd2aa49427c639c455bf5508ee (diff)
downloadgdb-ce0420dced59a0e1fc114e9bee2117ded5342021.zip
gdb-ce0420dced59a0e1fc114e9bee2117ded5342021.tar.gz
gdb-ce0420dced59a0e1fc114e9bee2117ded5342021.tar.bz2
2009-09-21 Jason Orendorff <jason.orendorff@gmail.com>
PR python/10666: * python/py-function.c (fnpy_init): Use xstrdup.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-function.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/python/py-function.c b/gdb/python/py-function.c
index 8a5abaf..58fb367 100644
--- a/gdb/python/py-function.c
+++ b/gdb/python/py-function.c
@@ -112,11 +112,10 @@ fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
{
PyObject *ds_obj = PyObject_GetAttrString (self, "__doc__");
if (ds_obj && gdbpy_is_string (ds_obj))
- /* Nothing ever frees this. */
docstring = python_string_to_host_string (ds_obj);
}
if (! docstring)
- docstring = _("This function is not documented.");
+ docstring = xstrdup (_("This function is not documented."));
add_internal_function (name, docstring, fnpy_call, self);
return 0;