support: Free gdb_script_name
Checks
Commit Message
Identified by static analysis.
---
support/support_test_main.c | 1 +
1 file changed, 1 insertion(+)
Comments
Siddhesh Poyarekar via Libc-alpha <libc-alpha@sourceware.org> writes:
> Identified by static analysis.
> ---
> support/support_test_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/support/support_test_main.c b/support/support_test_main.c
> index cb72512226..07e3cdd173 100644
> --- a/support/support_test_main.c
> +++ b/support/support_test_main.c
> @@ -221,6 +221,7 @@ run_test_function (int argc, char **argv, const struct test_config *config)
> fprintf (gdb_script, "attach %ld\n", (long int) mypid);
> fprintf (gdb_script, "set wait_for_debugger = 0\n");
> fclose (gdb_script);
> + free (gdb_script_name);
> }
>
> /* Wait for the debugger to set wait_for_debugger to zero. */
LGTM.
Reviewed-by: DJ Delorie <dj@redhat.com>
@@ -221,6 +221,7 @@ run_test_function (int argc, char **argv, const struct test_config *config)
fprintf (gdb_script, "attach %ld\n", (long int) mypid);
fprintf (gdb_script, "set wait_for_debugger = 0\n");
fclose (gdb_script);
+ free (gdb_script_name);
}
/* Wait for the debugger to set wait_for_debugger to zero. */