diff options
author | Tom Tromey <tom@tromey.com> | 2023-12-10 07:45:24 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-12-13 14:12:52 -0700 |
commit | fde841947e445a98f22a04465daa75a9fb6af051 (patch) | |
tree | f95774d5b6c4e560ee50c593ffd3241f8e0519bc /gdb/mi | |
parent | e7cdec6605837a5b79442fc06bd66d6372025040 (diff) | |
download | gdb-fde841947e445a98f22a04465daa75a9fb6af051.zip gdb-fde841947e445a98f22a04465daa75a9fb6af051.tar.gz gdb-fde841947e445a98f22a04465daa75a9fb6af051.tar.bz2 |
Use unique_xmalloc_ptr in explicit_location_spec
This changes explicit_location_spec to use unique_xmalloc_ptr,
removing some manual memory management.
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-break.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index 44835c7..a4b62cb 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -267,15 +267,15 @@ mi_cmd_break_insert_1 (int dprintf, const char *command, break; case EXPLICIT_SOURCE_OPT: is_explicit = 1; - explicit_loc->source_filename = xstrdup (oarg); + explicit_loc->source_filename = make_unique_xstrdup (oarg); break; case EXPLICIT_FUNC_OPT: is_explicit = 1; - explicit_loc->function_name = xstrdup (oarg); + explicit_loc->function_name = make_unique_xstrdup (oarg); break; case EXPLICIT_LABEL_OPT: is_explicit = 1; - explicit_loc->label_name = xstrdup (oarg); + explicit_loc->label_name = make_unique_xstrdup (oarg); break; case EXPLICIT_LINE_OPT: is_explicit = 1; |