On Sun, Jan 12, 2025 at 8:59 PM Alexander Strasser via ffmpeg-devel
<ffmpeg-devel@ffmpeg.org> wrote:
>
> On 2025-01-08 19:42 +0800, Jun Zhao wrote:
> > From: Jun Zhao <mypopy...@gmail.com>
> >
> > close the input file if open output fail
> >
> > Signed-off-by: Jun Zhao <barryjz...@tencent.com>
> > ---
> >  ffbuild/bin2c.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/ffbuild/bin2c.c b/ffbuild/bin2c.c
> > index dfeedd7669..168b0c658d 100644
> > --- a/ffbuild/bin2c.c
> > +++ b/ffbuild/bin2c.c
> > @@ -38,8 +38,10 @@ int main(int argc, char **argv)
> >          return -1;
> >
> >      output = fopen(argv[2], "wb");
> > -    if (!output)
> > +    if (!output) {
> > +        fclose(input);
> >          return -1;
> > +    }
> >
> >      if (argc == 4) {
> >          name = argv[3];
>
> Not urgent because it's return from main. Anyway LGTM :)
>
> There is another similar instance of this problem down at
> the end of the function. Maybe you could also review/test
> my attached patch and push on top.
>
Looks like Ok. will merge the attached patch with one
>
> Thanks,
>   Alexander
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to