From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25031 invoked by alias); 12 Aug 2015 18:48:35 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 25020 invoked by uid 89); 12 Aug 2015 18:48:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 12 Aug 2015 18:48:33 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Initialize `location' in gdbpy_decode_line From: sergiodj+buildbot@redhat.com To: gdb-testers@sourceware.org Message-Id: <59ecaff36145add82c315ba7a008c4a5db4a6f51@gdb-build> Date: Wed, 12 Aug 2015 18:48:00 -0000 X-SW-Source: 2015-q3/txt/msg07069.txt.bz2 *** TEST RESULTS FOR COMMIT 59ecaff36145add82c315ba7a008c4a5db4a6f51 *** Author: Keith Seitz Branch: master Commit: 59ecaff36145add82c315ba7a008c4a5db4a6f51 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 {