Re: [PATCH 2/4] rt-tests: cyclicdeadline: add missing free calls

John Kacur
2019-04-05T14:34:32Z

> The threads and thread data structures are allocated using calloc(). Free them
> as well.
>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
> src/sched_deadline/cyclicdeadline.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
> index 303b5e96647a..f4dd26a2dba2 100644
> --- a/src/sched_deadline/cyclicdeadline.c
> +++ b/src/sched_deadline/cyclicdeadline.c
> @@ -1261,6 +1261,8 @@ int main (int argc, char **argv)
> }
> }
>
> + free(thread);
> + free(sched_data);
> free(setcpu_buf);
> return 0;
> }
> --
> 2.11.0
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>