public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gprofng: fix -Wuse-after-free warning
@ 2023-12-14 19:15 Vladimir Mezentsev
  0 siblings, 0 replies; only message in thread
From: Vladimir Mezentsev @ 2023-12-14 19:15 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=01b386b55ecadcfce98896b9214edcd1e6fe0e62

commit 01b386b55ecadcfce98896b9214edcd1e6fe0e62
Author: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Date:   Wed Dec 13 17:52:15 2023 -0800

    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.

Diff:
---
 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-14 19:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 19:15 [binutils-gdb] 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).