2011-03-06 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Mon, 7 Mar 2011 18:34:31 +0000 (18:34 +0000)
committerMichael Snyder <msnyder@vmware.com>
Mon, 7 Mar 2011 18:34:31 +0000 (18:34 +0000)
* main.c (captured_main): Fix memory leak.

gdb/ChangeLog
gdb/main.c

index cf0b129d8b1f8d4e3c0e6182b34f9455ebc87ffe..85abd06bf814b36da363c8c490b6f651ae910d95 100644 (file)
@@ -1,3 +1,7 @@
+2011-03-06  Michael Snyder  <msnyder@vmware.com>
+
+       * main.c (captured_main): Fix memory leak.
+
 2011-03-07  Andreas Schwab  <schwab@linux-m68k.org>
 
        * ada-lang.c (compare_names): Call is_name_suffix with string1
index 6be4805b5677d7289c84aedb373e577238228efc..ff305a1f69d834265aa5f731812f5ca29782c23c 100644 (file)
@@ -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