aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-06-28 22:14:06 +0000
committerMichael Snyder <msnyder@vmware.com>2007-06-28 22:14:06 +0000
commit77accacd474022e900c001d986f3cf16ce5b0229 (patch)
treec448a80f4ef139f3dfc971440f5df031e7e3a90e
parentdd3526aae6ef530f6a5356fbe36819c9195fe416 (diff)
downloadgdb-77accacd474022e900c001d986f3cf16ce5b0229.zip
gdb-77accacd474022e900c001d986f3cf16ce5b0229.tar.gz
gdb-77accacd474022e900c001d986f3cf16ce5b0229.tar.bz2
2007-06-28 Michael Snyder <msnyder@access-company.com>
* source.c (unset_substitute_path_command): Plug leak (Coverity).
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/source.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bea69db..8ce75e6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,7 @@
2007-06-28 Michael Snyder <msnyder@access-company.com>
+ * 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 a142b32..1067e62 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"));