[FFmpeg-devel] [PATCH] lavfi/buffersrc: fix memleak
Paul B Mahol
onemda at gmail.com
Tue Jun 19 22:16:15 CEST 2012
On 6/19/12, Nicolas George <nicolas.george at normalesup.org> wrote:
> Le duodi 2 messidor, an CCXX, Paul B Mahol a ecrit :
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>> libavfilter/buffersrc.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
>> index b50a5e1..e557983 100644
>> --- a/libavfilter/buffersrc.c
>> +++ b/libavfilter/buffersrc.c
>> @@ -242,7 +242,7 @@ static av_cold int init_video(AVFilterContext *ctx,
>> const char *args, void *opaq
>> {
>> BufferSourceContext *c = ctx->priv;
>> char pix_fmt_str[128], sws_param[256] = "", *colon, *equal;
>> - int ret, n = 0;
>> + int ret = 0, n = 0;
>>
>> c->class = &vbuffer_class;
>>
>> @@ -287,7 +287,6 @@ static av_cold int init_video(AVFilterContext *ctx,
>> const char *args, void *opaq
>> c->w, c->h, av_pix_fmt_descriptors[c->pix_fmt].name,
>> c->time_base.num, c->time_base.den, c->frame_rate.num,
>> c->frame_rate.den,
>> c->pixel_aspect.num, c->pixel_aspect.den, (char
>> *)av_x_if_null(c->sws_param, ""));
>> - return 0;
>>
>> fail:
>> av_opt_free(c);
>
> What leak does that fix? I thought it could be c->sws_param, but it is
> freed
> in uninit.
Strings allocated with av_opt_set_defaults & av_set_options_strings.
More information about the ffmpeg-devel
mailing list