Remove a few if (p) av_free(p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 437fb1c87d)
This commit is contained in:
committed by
Michael Niedermayer
parent
0c8eb72ec5
commit
e31a744155
@@ -111,8 +111,7 @@ static int parse_fmtp_config(AVCodecContext * codec, char *value)
|
||||
{
|
||||
/* decode the hexa encoded parameter */
|
||||
int len = ff_hex_to_data(NULL, value);
|
||||
if (codec->extradata)
|
||||
av_free(codec->extradata);
|
||||
av_free(codec->extradata);
|
||||
codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!codec->extradata)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
@@ -334,12 +334,9 @@ static int smacker_read_close(AVFormatContext *s)
|
||||
int i;
|
||||
|
||||
for(i = 0; i < 7; i++)
|
||||
if(smk->bufs[i])
|
||||
av_free(smk->bufs[i]);
|
||||
if(smk->frm_size)
|
||||
av_free(smk->frm_size);
|
||||
if(smk->frm_flags)
|
||||
av_free(smk->frm_flags);
|
||||
av_free(smk->bufs[i]);
|
||||
av_free(smk->frm_size);
|
||||
av_free(smk->frm_flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user