diff options
Diffstat (limited to 'gdb/guile/guile.c')
-rw-r--r-- | gdb/guile/guile.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c index c6959f5..71d61f3 100644 --- a/gdb/guile/guile.c +++ b/gdb/guile/guile.c @@ -270,13 +270,10 @@ static void gdbscm_source_script (const struct extension_language_defn *extlang, FILE *file, const char *filename) { - char *msg = gdbscm_safe_source_script (filename); + gdb::unique_xmalloc_ptr<char> msg = gdbscm_safe_source_script (filename); if (msg != NULL) - { - fprintf_filtered (gdb_stderr, "%s\n", msg); - xfree (msg); - } + fprintf_filtered (gdb_stderr, "%s\n", msg.get ()); } /* (execute string [#:from-tty boolean] [#:to-string boolean]) |