Keith Seitz 59ecaff361 Initialize `location' in gdbpy_decode_line
BuildBot flagged an uninitialized variable coming from one of the patches
in my recently committed locations/explicit patchset.

The following patch fixes this.

gdb/ChangeLog

	* python/python.c (gdbpy_decode_line): Initialize `location' to NULL
	and only call decode_line_1 when it is non-NULL.

diff --git a/gdb/python/python.c b/gdb/python/python.c
index c28f98b..14da62c 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -730,7 +730,7 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
   PyObject *result = NULL;
   PyObject *return_result = NULL;
   PyObject *unparsed = NULL;
-  struct event_location *location;
+  struct event_location *location = NULL;

   if (! PyArg_ParseTuple (args, "|s", &arg))
     return NULL;
@@ -747,7 +747,7 @@ gdbpy_decode_line (PyObject *self, PyObject *args)

   TRY
     {
-      if (arg)
+      if (location != NULL)
 	sals = decode_line_1 (location, 0, 0, 0);
       else
 	{
2015-08-12 11:31:24 -07:00
..
2015-08-06 09:24:58 -07:00
2015-03-07 15:14:14 +00:00
2015-03-07 15:14:14 +00:00
2015-04-11 19:49:03 +02:00
2015-02-11 11:20:21 +00:00
2015-03-07 15:14:14 +00:00
2015-05-26 16:13:04 -07:00
2015-03-07 15:14:14 +00:00
2015-04-28 21:53:54 -07:00
2015-05-15 16:00:40 +01:00
2015-03-07 15:14:14 +00:00
2015-04-29 13:24:21 -07:00