[FFmpeg-devel] [PATCH 1/2] ffbuild/bin2c: misc fix
mypopy at gmail.com
mypopy at gmail.com
Mon Jan 13 10:58:41 EET 2025
On Sun, Jan 12, 2025 at 8:59 PM Alexander Strasser via ffmpeg-devel
<ffmpeg-devel at ffmpeg.org> wrote:
>
> On 2025-01-08 19:42 +0800, Jun Zhao wrote:
> > From: Jun Zhao <mypopydev at gmail.com>
> >
> > close the input file if open output fail
> >
> > Signed-off-by: Jun Zhao <barryjzhao at 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
More information about the ffmpeg-devel
mailing list