This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 05/28] py-cmd.c error-checking bug fix
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 15 May 2013 17:01:32 +0100
- Subject: Re: [PATCH 05/28] py-cmd.c error-checking bug fix
- References: <87ehe638ww dot fsf at fleche dot redhat dot com> <87fvym1tmo dot fsf at fleche dot redhat dot com>
On 04/19/2013 03:29 PM, Tom Tromey wrote:
> 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;
>
Shouldn't this be 'malloc_failure (0)' instead of returning NULL?
--
Pedro Alves