fraps: fix memleak

Found-by reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-09 19:33:33 +01:00
parent 8892d0492d
commit 46082e6186
1 changed files with 3 additions and 1 deletions

View File

@ -114,8 +114,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
else if(Uoff) dst[i] += 0x80;
}
dst += stride;
if(get_bits_left(&gb) < 0)
if(get_bits_left(&gb) < 0){
free_vlc(&vlc);
return -1;
}
}
free_vlc(&vlc);
return 0;