mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-13 19:05:37 +00:00
avcodec/sonic: fix memleaks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8477e63d3c
commit
ec4d761c74
1 changed files with 4 additions and 4 deletions
|
|
@ -193,7 +193,7 @@ static int intlist_write(PutBitContext *pb, int *buf, int entries, int base_2_pa
|
|||
bits = av_calloc(entries*max, sizeof(*bits));
|
||||
if (!bits)
|
||||
{
|
||||
// av_free(copy);
|
||||
av_free(copy);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
|
|
@ -249,8 +249,8 @@ static int intlist_write(PutBitContext *pb, int *buf, int entries, int base_2_pa
|
|||
if (buf[i])
|
||||
put_bits(pb, 1, buf[i] < 0);
|
||||
|
||||
// av_free(bits);
|
||||
// av_free(copy);
|
||||
av_free(bits);
|
||||
av_free(copy);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -341,7 +341,7 @@ static int intlist_read(GetBitContext *gb, int *buf, int entries, int base_2_par
|
|||
|
||||
pos++;
|
||||
}
|
||||
// av_free(bits);
|
||||
av_free(bits);
|
||||
|
||||
// read signs
|
||||
for (i = 0; i < entries; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue