diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:14:51 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:14:51 +0000 |
commit | 3919fd966cd15e6ef79aa58e3e75ef12d764999f (patch) | |
tree | 956d03007c4394bcaf3e8bc13afd1a587c8a77b4 | |
parent | 0430e8cba970e103a67e6066b7475f1fd8bae184 (diff) | |
download | binutils-3919fd966cd15e6ef79aa58e3e75ef12d764999f.zip binutils-3919fd966cd15e6ef79aa58e3e75ef12d764999f.tar.gz binutils-3919fd966cd15e6ef79aa58e3e75ef12d764999f.tar.bz2 |
* py-cmd.c (gdbpy_string_to_argv): Check result of
PyList_New.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/py-cmd.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 34a73f6..a9f4354 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-05-20 Tom Tromey <tromey@redhat.com> + * py-cmd.c (gdbpy_string_to_argv): Check result of + PyList_New. + +2013-05-20 Tom Tromey <tromey@redhat.com> + * python/python.c (before_prompt_hook): Add cleanup to decref 'hook'. diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index 3da9960..ca9e415 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -668,6 +668,8 @@ gdbpy_string_to_argv (PyObject *self, PyObject *args) return NULL; py_argv = PyList_New (0); + if (py_argv == NULL) + return NULL; /* buildargv uses NULL to represent an empty argument list, but we can't use that in Python. Instead, if ARGS is "" then return an empty list. |