diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a68c1ab248..9ae49008d2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-14 Simon Marchi + + * debuginfod-support.c (debuginfod_source_query): Use + make_unique_xstrdup. + 2020-09-14 Simon Marchi * gdbtypes.h (TYPE_INSTANCE_FLAGS): Remove, replace all uses diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index 0dc88c2c2a..73db5360c4 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -121,7 +121,7 @@ debuginfod_source_query (const unsigned char *build_id, safe_strerror (-fd.get ()), styled_string (file_name_style.style (), srcpath)); else - destname->reset (xstrdup (srcpath)); + *destname = make_unique_xstrdup (srcpath); debuginfod_end (c); return fd;