Changeset 1a4176cd60ddcddec2556b2679c7927569b2eaa7
- Timestamp:
- 14/06/07 08:13:25
(1 year ago)
- Author:
- Jean-Paul Saman <jpsaman@videolan.org>
- git-committer:
- Jean-Paul Saman <jpsaman@videolan.org> 1181801605 +0000
- git-parent:
[3869712ac488d65f17a38dfb3f5b0044f623b4dc]
- git-author:
- Jean-Paul Saman <jpsaman@videolan.org> 1181801605 +0000
- Message:
Fix potential memleak/crash
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re3204e4 |
r1a4176c |
|
| 278 | 278 | { |
|---|
| 279 | 279 | subpicture_region_t *p_region = malloc( sizeof(subpicture_region_t) ); |
|---|
| | 280 | if( !p_region ) return NULL; |
|---|
| | 281 | |
|---|
| 280 | 282 | memset( p_region, 0, sizeof(subpicture_region_t) ); |
|---|
| 281 | 283 | p_region->p_next = 0; |
|---|
| … | … | |
| 300 | 302 | { |
|---|
| 301 | 303 | free( p_region ); |
|---|
| 302 | | free( p_fmt->p_palette ); |
|---|
| | 304 | if( p_fmt->p_palette ) free( p_fmt->p_palette ); |
|---|
| 303 | 305 | return NULL; |
|---|
| 304 | 306 | } |
|---|
| … | … | |
| 676 | 678 | |
|---|
| 677 | 679 | /* Force palette if requested */ |
|---|
| 678 | | if( p_spu->b_force_palette && VLC_FOURCC('Y','U','V','P') == |
|---|
| 679 | | p_region->fmt.i_chroma ) |
|---|
| | 680 | if( p_spu->b_force_palette && |
|---|
| | 681 | (VLC_FOURCC('Y','U','V','P') == p_region->fmt.i_chroma) ) |
|---|
| 680 | 682 | { |
|---|
| 681 | 683 | memcpy( p_region->fmt.p_palette->palette, |
|---|