gprofng: fix -Wuse-after-free warning

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.
This commit is contained in:
Vladimir Mezentsev
2023-12-13 17:52:15 -08:00
parent 03ce4e1bdb
commit 01b386b55e

View File

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