Changeset 81c68015ca4dd00cb35d1784040a48e5915c7989
- Timestamp:
- 05/31/08 17:13:43
(3 months ago)
- Author:
- Jean-Paul Saman <jpsaman@videolan.org>
- git-committer:
- Jean-Paul Saman <jpsaman@videolan.org> 1212246823 +0200
- git-parent:
[222d90e0f1b6efc6421228392e02a3906680d5c7]
- git-author:
- Jean-Paul Saman <jpsaman@videolan.org> 1212246823 +0200
- Message:
Fix CID 103: resource leak in EsOutAdd? and check malloc return values.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1f75e57 |
r81c6801 |
|
| 184 | 184 | int i; |
|---|
| 185 | 185 | |
|---|
| | 186 | if( !out ) return NULL; |
|---|
| | 187 | if( !p_sys ) |
|---|
| | 188 | { |
|---|
| | 189 | free( out ); |
|---|
| | 190 | return NULL; |
|---|
| | 191 | } |
|---|
| | 192 | |
|---|
| 186 | 193 | out->pf_add = EsOutAdd; |
|---|
| 187 | 194 | out->pf_send = EsOutSend; |
|---|
| … | … | |
| 571 | 578 | |
|---|
| 572 | 579 | es_out_pgrm_t *p_pgrm = malloc( sizeof( es_out_pgrm_t ) ); |
|---|
| | 580 | if( !p_pgrm ) return NULL; |
|---|
| 573 | 581 | |
|---|
| 574 | 582 | /* Init */ |
|---|
| … | … | |
| 890 | 898 | int i; |
|---|
| 891 | 899 | |
|---|
| | 900 | if( !es ) return NULL; |
|---|
| | 901 | |
|---|
| 892 | 902 | if( fmt->i_group < 0 ) |
|---|
| 893 | 903 | { |
|---|
| 894 | 904 | msg_Err( p_input, "invalid group number" ); |
|---|
| | 905 | free( es ); |
|---|
| 895 | 906 | return NULL; |
|---|
| 896 | 907 | } |
|---|