aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/scm-safe-call.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:00:33 -0300
committerAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:00:33 -0300
commit9e0703de64a6dd4deae2ebd569955f14337f2710 (patch)
treecec45139f1febef6441deabae142c3fb3f2c61f3 /gdb/guile/scm-safe-call.c
parent13b9f79a1904081d984a64037af6457c1e3ff7b6 (diff)
parent43573013c9836f2b91b74b9b29dac35fdb41e06b (diff)
downloadgdb-9e0703de64a6dd4deae2ebd569955f14337f2710.zip
gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.gz
gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.bz2
Merge remote-tracking branch 'remotes/master' into users/aoliva/SFN
Updated local changes to binutils/testsuite/binutils-all/readelf.exp to match the unresolved (failed to assemble) messages introduced by Alan Modra.
Diffstat (limited to 'gdb/guile/scm-safe-call.c')
-rw-r--r--gdb/guile/scm-safe-call.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/guile/scm-safe-call.c b/gdb/guile/scm-safe-call.c
index 64a69a3..15bab27 100644
--- a/gdb/guile/scm-safe-call.c
+++ b/gdb/guile/scm-safe-call.c
@@ -438,19 +438,18 @@ gdbscm_safe_source_script (const char *filename)
%load-path, but we don't want %load-path to be searched. At least not
by default. This function is invoked by the "source" GDB command which
already has its own path search support. */
- char *abs_filename = NULL;
+ gdb::unique_xmalloc_ptr<char> abs_filename;
const char *result;
if (!IS_ABSOLUTE_PATH (filename))
{
abs_filename = gdb_realpath (filename);
- filename = abs_filename;
+ filename = abs_filename.get ();
}
result = gdbscm_with_guile (scscm_source_scheme_script,
(void *) filename);
- xfree (abs_filename);
if (result != NULL)
return xstrdup (result);
return NULL;