Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Pierre-Anthony Lemieux <pal@sandflow.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3 1/2] fate/imf: fix memory leak
Date: Thu, 18 May 2023 15:16:10 -0700
Message-ID: <CAF_7JxD91DLk-U6GyXvAvMkuD=bhpRcBt1t0uLpjSSYG6sCYsw@mail.gmail.com> (raw)
In-Reply-To: <20230515183300.7252-1-pal@sandflow.com>

Will apply shortly.

On Mon, May 15, 2023 at 11:33 AM <pal@sandflow.com> wrote:
>
> From: Pierre-Anthony Lemieux <pal@palemieux.com>
>
> ---
>  libavformat/tests/imf.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c
> index cfd84fb8c8..c02cd87ceb 100644
> --- a/libavformat/tests/imf.c
> +++ b/libavformat/tests/imf.c
> @@ -402,6 +402,9 @@ static int test_bad_cpl_parsing(FFIMFCPL **cpl)
>          return ret;
>      }
>
> +    ff_imf_cpl_free(*cpl);
> +    *cpl = NULL;
> +
>      return 0;
>  }
>
> @@ -423,6 +426,9 @@ static int test_bad_resource_cpl_parsing(FFIMFCPL **cpl)
>          return ret;
>      }
>
> +    ff_imf_cpl_free(*cpl);
> +    *cpl = NULL;
> +
>      return 0;
>  }
>
> @@ -594,8 +600,11 @@ int main(int argc, char *argv[])
>      printf("#### End failing test ####\n");
>
>      printf("#### The following should emit errors ####\n");
> -    if (test_bad_resource_cpl_parsing(&cpl) != 0)
> +    if (test_bad_resource_cpl_parsing(&cpl) != 0) {
> +        if (cpl)
> +            printf("Improper cleanup after failed CPL parsing\n");
>          ret = 1;
> +    }
>      printf("#### End emission of errors ####\n");
>
>      return ret;
> --
> 2.25.1
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

      parent reply	other threads:[~2023-05-18 22:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 18:32 pal
2023-05-15 18:33 ` [FFmpeg-devel] [PATCH v3 2/2] fate/imf: remove redundant code pal
2023-05-18 22:16 ` Pierre-Anthony Lemieux [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF_7JxD91DLk-U6GyXvAvMkuD=bhpRcBt1t0uLpjSSYG6sCYsw@mail.gmail.com' \
    --to=pal@sandflow.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git