diff mbox series

support: Free gdb_script_name

Message ID 20210512043704.443470-1-siddhesh@sourceware.org
State Committed
Commit c7d200400c6a8fc0428005a83cdf1ae2c87e009c
Headers show
Series support: Free gdb_script_name | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Siddhesh Poyarekar May 12, 2021, 4:37 a.m. UTC
Identified by static analysis.
---
 support/support_test_main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

DJ Delorie May 12, 2021, 7:27 p.m. UTC | #1
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>
diff mbox series

Patch

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.  */