From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10795 invoked by alias); 28 Jun 2007 22:27:51 -0000 Received: (qmail 10787 invoked by uid 22791); 28 Jun 2007 22:27:50 -0000 X-Spam-Check-By: sourceware.org Received: from a.mail.sonic.net (HELO a.mail.sonic.net) (64.142.16.245) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 28 Jun 2007 22:27:45 +0000 Received: from webmail.sonic.net (a.webmail.sonic.net [64.142.100.132]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l5SMRhOW019344 for ; Thu, 28 Jun 2007 15:27:43 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Thu, 28 Jun 2007 15:27:43 -0700 (PDT) Message-ID: <9270.12.7.175.2.1183069663.squirrel@webmail.sonic.net> Date: Thu, 28 Jun 2007 22:35:00 -0000 Subject: [OB] Add cleanup, source.c From: msnyder@sonic.net To: gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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: 2007-06/txt/msg00502.txt.bz2 A missed opportunity for cleanup, flagged by Coverity. I'm cut'and'pasting the patch to avoid my browser turning it into a binary stream. This may eliminate tabs, but I don't expect anybody to actually apply this with 'patch'... 2007-06-28 Michael Snyder * source.c (unset_substitute_path_command): Plug leak (Coverity). Index: source.c =================================================================== RCS file: /cvs/src/src/gdb/source.c,v retrieving revision 1.79 diff -p -r1.79 source.c *** source.c 24 Jan 2007 00:03:15 -0000 1.79 --- source.c 28 Jun 2007 22:12:36 -0000 *************** unset_substitute_path_command (char *arg *** 1852,1857 **** --- 1852,1858 ---- /* This function takes either 0 or 1 argument. */ + make_cleanup_freeargv (argv); if (argv != NULL && argv[0] != NULL && argv[1] != NULL) error (_("Incorrect usage, too many arguments in command"));