diff options
author | Andrew Burgess <aburgess@redhat.com> | 2021-11-08 14:58:46 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2021-11-16 17:45:45 +0000 |
commit | 8579fd136a614985bd27f20539c7bb7c5a51287d (patch) | |
tree | fb84850409a44e13e832cbadc9025d40c1d33d9f /gdb/mi | |
parent | 2bb7589ddf61e163f2e414e7033fad56ea17e784 (diff) | |
download | fsf-binutils-gdb-8579fd136a614985bd27f20539c7bb7c5a51287d.zip fsf-binutils-gdb-8579fd136a614985bd27f20539c7bb7c5a51287d.tar.gz fsf-binutils-gdb-8579fd136a614985bd27f20539c7bb7c5a51287d.tar.bz2 |
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.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-env.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c index f9685a5..078087f 100644 --- a/gdb/mi/mi-cmd-env.c +++ b/gdb/mi/mi-cmd-env.c @@ -48,7 +48,7 @@ env_execute_cli_command (const char *cmd, const char *args) gdb::unique_xmalloc_ptr<char> run; if (args != NULL) - run.reset (xstrprintf ("%s %s", cmd, args)); + run = xstrprintf ("%s %s", cmd, args); else run.reset (xstrdup (cmd)); execute_command ( /*ui */ run.get (), 0 /*from_tty */ ); |