From ce0420dced59a0e1fc114e9bee2117ded5342021 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 21 Sep 2009 16:18:42 +0000 Subject: 2009-09-21 Jason Orendorff PR python/10666: * python/py-function.c (fnpy_init): Use xstrdup. --- gdb/python/py-function.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/python/py-function.c') diff --git a/gdb/python/py-function.c b/gdb/python/py-function.c index 8a5abaff9d..58fb367e1d 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; -- cgit v1.2.3