diff options
author | Tom Tromey <tom@tromey.com> | 2023-12-10 07:22:07 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-12-13 14:12:52 -0700 |
commit | e7cdec6605837a5b79442fc06bd66d6372025040 (patch) | |
tree | f96afe68afb3f01f15fb2659ba78dd042818bf43 /gdb/location.h | |
parent | 63fc64a8d0ea8cb0bce0137db68503a75a6ecfe4 (diff) | |
download | gdb-e7cdec6605837a5b79442fc06bd66d6372025040.zip gdb-e7cdec6605837a5b79442fc06bd66d6372025040.tar.gz gdb-e7cdec6605837a5b79442fc06bd66d6372025040.tar.bz2 |
Use unique_xmalloc_ptr in linespec_location_spec
This changes linespec_location_spec to use unique_xmalloc_ptr,
removing some manual memory management.
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/location.h')
-rw-r--r-- | gdb/location.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/location.h b/gdb/location.h index c2083ae..e39a948 100644 --- a/gdb/location.h +++ b/gdb/location.h @@ -149,8 +149,6 @@ struct linespec_location_spec : public location_spec linespec_location_spec (const char **linespec, symbol_name_match_type match_type); - ~linespec_location_spec (); - location_spec_up clone () const override; bool empty_p () const override; @@ -159,7 +157,7 @@ struct linespec_location_spec : public location_spec symbol_name_match_type match_type; /* The linespec. */ - char *spec_string = nullptr; + gdb::unique_xmalloc_ptr<char> spec_string; protected: linespec_location_spec (const linespec_location_spec &other); |