aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2017-03-23 12:51:14 +0100
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2017-03-23 12:51:14 +0100
commit1a5e158b68d0fb3b1ba3d038e87c841239572a35 (patch)
tree9afe3fe652aef3eba18a4214167d8a738eba24b1 /gdb/python
parent3f2a3564b1c3872e4a380f2484d40ce2495a4835 (diff)
downloadgdb-1a5e158b68d0fb3b1ba3d038e87c841239572a35.zip
gdb-1a5e158b68d0fb3b1ba3d038e87c841239572a35.tar.gz
gdb-1a5e158b68d0fb3b1ba3d038e87c841239572a35.tar.bz2
Remove constness of libdir in do_start_initialization
The patch "Fix memory leak in python.c:do_start_initialization" (https://sourceware.org/ml/gdb-patches/2017-03/msg00407.html) introduced a compilation error on some platforms: ../../binutils-gdb/gdb/python/python.c: In function bool do_start_initialization(): ../../binutils-gdb/gdb/python/python.c:1556:16: error: invalid conversion from const void* to void* [-fpermissive] xfree (libdir); ^ This is fixed by removing the constness of libdir's data type. gdb/ChangeLog: * python/python.c (do_start_initialization): Remove 'const' from data type of libdir.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/python.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index d814252..d21e023 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1550,7 +1550,7 @@ do_start_initialization ()
/foo/bin/python
/foo/lib/pythonX.Y/...
This must be done before calling Py_Initialize. */
- const char *libdir = ldirname (python_libdir);
+ char *libdir = ldirname (python_libdir);
progname = concat (libdir, SLASH_STRING, "bin",
SLASH_STRING, "python", (char *) NULL);
xfree (libdir);