From: Michael Snyder Date: Thu, 28 Jun 2007 22:14:06 +0000 (+0000) Subject: 2007-06-28 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77accacd474022e900c001d986f3cf16ce5b0229;p=binutils-gdb.git 2007-06-28 Michael Snyder * source.c (unset_substitute_path_command): Plug leak (Coverity). --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bea69db22d0..8ce75e68f5a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-06-28 Michael Snyder + * source.c (unset_substitute_path_command): Plug leak (Coverity). + * cli/cli-script.c (build_command_line): Add null pointer guard (Coverity). diff --git a/gdb/source.c b/gdb/source.c index a142b32a90f..1067e62a8fd 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1852,6 +1852,7 @@ unset_substitute_path_command (char *args, int from_tty) /* 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"));