[PATCH i-g-t 1/1] tests/intel/xe_eudebug_online: Fix run_online_client memory leak
Piatkowski, Dominik Karol
dominik.karol.piatkowski at intel.com
Thu Dec 5 10:22:34 UTC 2024
> -----Original Message-----
> From: Grzegorzek, Dominik <dominik.grzegorzek at intel.com>
> Sent: Thursday, December 5, 2024 11:11 AM
> To: Piatkowski, Dominik Karol <dominik.karol.piatkowski at intel.com>; igt-
> dev at lists.freedesktop.org
> Subject: Re: [PATCH i-g-t 1/1] tests/intel/xe_eudebug_online: Fix
> run_online_client memory leak
>
> On Thu, 2024-12-05 at 10:56 +0100, Dominik Karol Piątkowski wrote:
> > In run_online_client, buf is created by create_uc_buf, that calls
> > intel_buf_create_full, that callocs and initializes it. This memory is
> > never freed. Fix it by adding missing free().
> >
> > Signed-off-by: Dominik Karol Piątkowski
> > <dominik.karol.piatkowski at intel.com>
> > ---
> > tests/intel/xe_eudebug_online.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tests/intel/xe_eudebug_online.c
> > b/tests/intel/xe_eudebug_online.c index 750350556..1c0f094aa 100644
> > --- a/tests/intel/xe_eudebug_online.c
> > +++ b/tests/intel/xe_eudebug_online.c
> > @@ -1132,6 +1132,8 @@ static void run_online_client(struct
> xe_eudebug_client *c)
> >
> DRM_XE_DEBUG_METADATA_PROGRAM_MODULE,
> > 2 * sizeof(*metadata));
> >
> > + free(buf);
> > +
> intel_buf_destroy?
>
> Regards,
> Dominik
intel_buf_destroy is even better, thanks! I will send v2 soon.
Thanks,
Dominik Karol
> > xe_eudebug_client_close_driver(c, fd); }
> >
More information about the igt-dev
mailing list