[Mesa-dev] [PATCH v2] intel/tools: fix resource leak

andrey simiklit asimiklit.work at gmail.com
Wed Oct 31 11:48:32 UTC 2018


Hello,

Sorry, one more point here.
Could I ask you to push it, because I don't have a push rights :-)

Thanks a lot,
Andrii.

On Fri, Oct 26, 2018 at 6:09 PM Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:

> On 26/10/2018 15:29, asimiklit.work at gmail.com wrote:
> > From: Andrii Simiklit <andrii.simiklit at globallogic.com>
> >
> > Some memory and file descriptors are not freed/closed.
> >
> > v2: fixed case where we skipped the 'aub' variable initialization
> >
> > Signed-off-by: Andrii Simiklit <andrii.simiklit at globallogic.com>
>
>
> Still :
>
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>
>
> Thanks!
>
>
> > ---
> >   src/intel/tools/error2aub.c | 10 ++++++++++
> >   1 file changed, 10 insertions(+)
> >
> > diff --git a/src/intel/tools/error2aub.c b/src/intel/tools/error2aub.c
> > index 8a23d5ef1e..2b850ce885 100644
> > --- a/src/intel/tools/error2aub.c
> > +++ b/src/intel/tools/error2aub.c
> > @@ -326,6 +326,16 @@ main(int argc, char *argv[])
> >
> >      aub_write_exec(&aub, batch_addr, aub_gtt_size(&aub),
> I915_EXEC_RENDER);
> >
> > +   free(out_filename);
> > +   free(line);
> > +   if(err_file) {
> > +      fclose(err_file);
> > +   }
> > +   if(aub.file) {
> > +      aub_file_finish(&aub);
> > +   } else if(aub_file) {
> > +      fclose(aub_file);
> > +   }
> >      return EXIT_SUCCESS;
> >   }
> >
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181031/47636dbe/attachment.html>


More information about the mesa-dev mailing list