Re: [FFmpeg-devel] [PATCH] lavfi/afir: fix vpad.name leak

2020-05-25 Thread myp...@gmail.com
On Mon, May 25, 2020 at 3:51 PM Paul B Mahol  wrote:
>
> typo in commit message.
Will fix, tks
>
> On 5/25/20, Jun Zhao  wrote:
> > From: Jun Zhao 
> >
> > Fixed vpad.name leak in error path, move the vpad related operation
> > only if enabeled show IR frequency response.
> >
> > Signed-off-by: Jun Zhao 
> > ---
> >  libavfilter/af_afir.c | 14 ++
> >  1 file changed, 6 insertions(+), 8 deletions(-)
> >
> > diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
> > index 7c7e845..5ba880f 100644
> > --- a/libavfilter/af_afir.c
> > +++ b/libavfilter/af_afir.c
> > @@ -876,6 +876,12 @@ static av_cold int init(AVFilterContext *ctx)
> >  if (!pad.name)
> >  return AVERROR(ENOMEM);
> >
> > +ret = ff_insert_outpad(ctx, 0, );
> > +if (ret < 0) {
> > +av_freep();
> > +return ret;
> > +}
> > +
> >  if (s->response) {
> >  vpad = (AVFilterPad){
> >  .name = av_strdup("filter_response"),
> > @@ -884,15 +890,7 @@ static av_cold int init(AVFilterContext *ctx)
> >  };
> >  if (!vpad.name)
> >  return AVERROR(ENOMEM);
> > -}
> >
> > -ret = ff_insert_outpad(ctx, 0, );
> > -if (ret < 0) {
> > -av_freep();
> > -return ret;
> > -}
> > -
> > -if (s->response) {
> >  ret = ff_insert_outpad(ctx, 1, );
> >  if (ret < 0) {
> >  av_freep();
> > --
> > 2.7.4
> >
___
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".

Re: [FFmpeg-devel] [PATCH] lavfi/afir: fix vpad.name leak

2020-05-25 Thread Paul B Mahol
typo in commit message.

On 5/25/20, Jun Zhao  wrote:
> From: Jun Zhao 
>
> Fixed vpad.name leak in error path, move the vpad related operation
> only if enabeled show IR frequency response.
>
> Signed-off-by: Jun Zhao 
> ---
>  libavfilter/af_afir.c | 14 ++
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
> index 7c7e845..5ba880f 100644
> --- a/libavfilter/af_afir.c
> +++ b/libavfilter/af_afir.c
> @@ -876,6 +876,12 @@ static av_cold int init(AVFilterContext *ctx)
>  if (!pad.name)
>  return AVERROR(ENOMEM);
>
> +ret = ff_insert_outpad(ctx, 0, );
> +if (ret < 0) {
> +av_freep();
> +return ret;
> +}
> +
>  if (s->response) {
>  vpad = (AVFilterPad){
>  .name = av_strdup("filter_response"),
> @@ -884,15 +890,7 @@ static av_cold int init(AVFilterContext *ctx)
>  };
>  if (!vpad.name)
>  return AVERROR(ENOMEM);
> -}
>
> -ret = ff_insert_outpad(ctx, 0, );
> -if (ret < 0) {
> -av_freep();
> -return ret;
> -}
> -
> -if (s->response) {
>  ret = ff_insert_outpad(ctx, 1, );
>  if (ret < 0) {
>  av_freep();
> --
> 2.7.4
>
> ___
> 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".
___
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".

[FFmpeg-devel] [PATCH] lavfi/afir: fix vpad.name leak

2020-05-24 Thread Jun Zhao
From: Jun Zhao 

Fixed vpad.name leak in error path, move the vpad related operation
only if enabeled show IR frequency response.

Signed-off-by: Jun Zhao 
---
 libavfilter/af_afir.c | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index 7c7e845..5ba880f 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -876,6 +876,12 @@ static av_cold int init(AVFilterContext *ctx)
 if (!pad.name)
 return AVERROR(ENOMEM);
 
+ret = ff_insert_outpad(ctx, 0, );
+if (ret < 0) {
+av_freep();
+return ret;
+}
+
 if (s->response) {
 vpad = (AVFilterPad){
 .name = av_strdup("filter_response"),
@@ -884,15 +890,7 @@ static av_cold int init(AVFilterContext *ctx)
 };
 if (!vpad.name)
 return AVERROR(ENOMEM);
-}
 
-ret = ff_insert_outpad(ctx, 0, );
-if (ret < 0) {
-av_freep();
-return ret;
-}
-
-if (s->response) {
 ret = ff_insert_outpad(ctx, 1, );
 if (ret < 0) {
 av_freep();
-- 
2.7.4

___
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".