From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25264 invoked by alias); 2 Mar 2011 18:43:02 -0000 Received: (qmail 25254 invoked by uid 22791); 2 Mar 2011 18:43:01 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Mar 2011 18:42:57 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 421A148002; Wed, 2 Mar 2011 10:42:56 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id 380028EF19; Wed, 2 Mar 2011 10:42:56 -0800 (PST) Message-ID: <4D6E8FAF.8000402@vmware.com> Date: Wed, 02 Mar 2011 18:43:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" CC: Phil Muldoon Subject: [RFA] py-inferior.c, check return value of PyList_Append Content-Type: multipart/mixed; boundary="------------030701090606070802020609" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00119.txt.bz2 This is a multi-part message in MIME format. --------------030701090606070802020609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 80 Just making this up as I go, here, need a review. Should anybody get a DECREF? --------------030701090606070802020609 Content-Type: text/plain; name="py-inferior.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="py-inferior.txt" Content-length: 708 2011-03-02 Michael Snyder * py-inferior.c (inferior_to_inferior_object): Check return value from PyList_Append. Index: python/py-inferior.c =================================================================== RCS file: /cvs/src/src/gdb/python/py-inferior.c,v retrieving revision 1.5 diff -u -p -u -p -r1.5 py-inferior.c --- python/py-inferior.c 4 Feb 2011 21:54:16 -0000 1.5 +++ python/py-inferior.c 2 Mar 2011 18:39:54 -0000 @@ -326,7 +326,9 @@ build_inferior_list (struct inferior *in PyObject *list = arg; PyObject *inferior = inferior_to_inferior_object (inf); - PyList_Append (list, inferior); + if (PyList_Append (list, inferior)) + return 1; + return 0; } --------------030701090606070802020609--