From 8579fd136a614985bd27f20539c7bb7c5a51287d Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 8 Nov 2021 14:58:46 +0000 Subject: gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr The motivation is to reduce the number of places where unmanaged pointers are returned from allocation type routines. All of the callers are updated. There should be no user visible changes after this commit. --- gdb/jit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/jit.c') diff --git a/gdb/jit.c b/gdb/jit.c index 666262e..e190e69 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -164,8 +164,8 @@ jit_reader_load_command (const char *args, int from_tty) error (_("JIT reader already loaded. Run jit-reader-unload first.")); if (!IS_ABSOLUTE_PATH (file.get ())) - file.reset (xstrprintf ("%s%s%s", jit_reader_dir.c_str (), SLASH_STRING, - file.get ())); + file = xstrprintf ("%s%s%s", jit_reader_dir.c_str (), + SLASH_STRING, file.get ()); loaded_jit_reader = jit_reader_load (file.get ()); reinit_frame_cache (); -- cgit v1.1