* [PATCH] gprofng: fix -Wuse-after-free warning
@ 2023-12-14 1:54 vladimir.mezentsev
0 siblings, 0 replies; only message in thread
From: vladimir.mezentsev @ 2023-12-14 1:54 UTC (permalink / raw)
To: binutils; +Cc: Vladimir Mezentsev
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Removed incorrect unnecessary code.
gprofng/ChangeLog
2023-12-13 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
* src/collctrl.cc (set_synctrace): Fix -Wuse-after-free warning.
---
gprofng/src/collctrl.cc | 4 ----
1 file changed, 4 deletions(-)
diff --git a/gprofng/src/collctrl.cc b/gprofng/src/collctrl.cc
index 5d68b689a64..aeff5a0336c 100644
--- a/gprofng/src/collctrl.cc
+++ b/gprofng/src/collctrl.cc
@@ -1081,10 +1081,6 @@ Coll_Ctrl::set_synctrace (const char *string)
if (*endchar != 0 || tval < 0)
{
free (val);
- /* invalid setting */
- /* restore the comma, if it was zeroed out */
- if (comma_p != NULL)
- *comma_p = ',';
return dbe_sprintf (GTXT ("Unrecognized synchronization tracing threshold `%s'\n"), string);
}
free (val);
--
2.31.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-14 1:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 1:54 [PATCH] gprofng: fix -Wuse-after-free warning vladimir.mezentsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).