From: Tom Tromey Date: Mon, 20 May 2013 20:14:51 +0000 (+0000) Subject: * py-cmd.c (gdbpy_string_to_argv): Check result of X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3919fd966cd15e6ef79aa58e3e75ef12d764999f;p=binutils-gdb.git * py-cmd.c (gdbpy_string_to_argv): Check result of PyList_New. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 34a73f6e88e..a9f4354e033 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-20 Tom Tromey + + * py-cmd.c (gdbpy_string_to_argv): Check result of + PyList_New. + 2013-05-20 Tom Tromey * python/python.c (before_prompt_hook): Add cleanup to diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index 3da9960c580..ca9e415c436 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.