gdb: use make_unique_xstrdup in debuginfod-support.c

Use make_unique_xstrdup instead of reset + xstrdup.

gdb/ChangeLog:

	* debuginfod-support.c (debuginfod_source_query): Use
	make_unique_xstrdup.

Change-Id: Iee9524fea7630b4d6ee5c74e30c60fe222dc1d2c
This commit is contained in:
Simon Marchi
2020-09-14 22:28:25 -04:00
parent 10242f367f
commit 3246bd8ec5
2 changed files with 6 additions and 1 deletions

View File

@@ -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;