[PATCH] gdb/guile: remove some manual xfree calls

Tom Tromey tom@tromey.com
Fri Jun 2 16:43:20 GMT 2023


>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:

Andrew>        if (block == NULL)
Andrew> -	{
Andrew> -	  xfree (name);
Andrew> -	  gdbscm_throw (exception);
Andrew> -	}
Andrew> +	gdbscm_throw (exception);

Unfortunately I don't think this is the same.  IIUC, gdbscm_throw is a
noreturn function that calls longjmp.  So, the destructor will never be
run.

Tom


More information about the Gdb-patches mailing list