aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-cmd.c')
-rw-r--r--gdb/python/py-cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index 245d66a..c0e3291 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -481,7 +481,10 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
pfx_name[out] = '\0';
}
else if (cmp < 0)
+ {
+ xfree (cmd_name);
return -1;
+ }
}
if (PyObject_HasAttr (self, gdbpy_doc_cst))
{