diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-07 18:34:31 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-07 18:34:31 +0000 |
commit | e6040cbdcd2feb312855101655e6c314f8fc3d25 (patch) | |
tree | dba1a22892e7278a3152c0b7b4603aea49c0698c /gdb/main.c | |
parent | 052874e8a4698786ff07ce9d681275318905d1af (diff) | |
download | gdb-e6040cbdcd2feb312855101655e6c314f8fc3d25.zip gdb-e6040cbdcd2feb312855101655e6c314f8fc3d25.tar.gz gdb-e6040cbdcd2feb312855101655e6c314f8fc3d25.tar.bz2 |
2011-03-06 Michael Snyder <msnyder@vmware.com>
* main.c (captured_main): Fix memory leak.
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -352,11 +352,14 @@ captured_main (void *data) GDB_DATADIR_RELOCATABLE); #ifdef WITH_PYTHON_PATH - /* For later use in helping Python find itself. */ - python_libdir = relocate_directory (argv[0], - concat (WITH_PYTHON_PATH, - SLASH_STRING, "lib", NULL), - PYTHON_PATH_RELOCATABLE); + { + /* For later use in helping Python find itself. */ + char *tmp = concat (WITH_PYTHON_PATH, SLASH_STRING, "lib", NULL); + + python_libdir = relocate_directory (argv[0], tmp, + PYTHON_PATH_RELOCATABLE); + xfree (tmp); + } #endif #ifdef RELOC_SRCDIR |