This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[OB] Add cleanup, source.c


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  <msnyder@access-company.com>

        * 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"));




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]