diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-02-27 00:59:07 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-02-27 00:59:07 +0000 |
commit | 66fd3b1e63d5273421e2df25bc760deb499799af (patch) | |
tree | 25fef2ca44cb60b28dbde9e85c74a1789937fa09 /gdb/maint.c | |
parent | 8c814cdde7fd000c640b4158b6492038b3e4d6dc (diff) | |
download | gdb-66fd3b1e63d5273421e2df25bc760deb499799af.zip gdb-66fd3b1e63d5273421e2df25bc760deb499799af.tar.gz gdb-66fd3b1e63d5273421e2df25bc760deb499799af.tar.bz2 |
2011-02-26 Michael Snyder <msnyder@vmware.com>
* maint.c (maintenance_do_deprecate): Plug a memory leak.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r-- | gdb/maint.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/maint.c b/gdb/maint.c index 60245f6..101c2de 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -644,6 +644,9 @@ maintenance_do_deprecate (char *text, int deprecate) cmd->flags |= MALLOCED_REPLACEMENT; return; } + /* If we get here, don't leak! */ + if (replacement != NULL) + xfree (replacement); } /* Maintenance set/show framework. */ |