Changeset 5d5eb43ff8df8e03fc18db124982db027cf4e271
- Timestamp:
- 12/06/07 14:22:36
(1 year ago)
- Author:
- Jean-Paul Saman <jpsaman@videolan.org>
- git-committer:
- Jean-Paul Saman <jpsaman@videolan.org> 1181650956 +0000
- git-parent:
[bd7d0c0914a76376947111eb3eaba98abb71f05a]
- git-author:
- Jean-Paul Saman <jpsaman@videolan.org> 1181650956 +0000
- Message:
Fix potential memleaks
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re3204e4 |
r5d5eb43 |
|
| 296 | 296 | if( psz_fontfile ) free( psz_fontfile ); |
|---|
| 297 | 297 | psz_fontfile = (char *)malloc( PATH_MAX + 1 ); |
|---|
| | 298 | if( !psz_fontfile ) |
|---|
| | 299 | { |
|---|
| | 300 | msg_Err( p_filter, "out of memory" ); |
|---|
| | 301 | goto error; |
|---|
| | 302 | } |
|---|
| 298 | 303 | #ifdef WIN32 |
|---|
| 299 | 304 | GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 ); |
|---|
| … | … | |
| 862 | 867 | { |
|---|
| 863 | 868 | filter_sys_t *p_sys = p_filter->p_sys; |
|---|
| 864 | | line_desc_t *p_lines = 0, *p_line = 0, *p_next = 0, *p_prev = 0; |
|---|
| | 869 | line_desc_t *p_lines = NULL, *p_line = NULL, *p_next = NULL, *p_prev = NULL; |
|---|
| 865 | 870 | int i, i_pen_y, i_pen_x, i_error, i_glyph_index, i_previous; |
|---|
| 866 | | uint32_t *psz_unicode, *psz_unicode_orig = 0, i_char, *psz_line_start; |
|---|
| | 871 | uint32_t *psz_unicode, *psz_unicode_orig = NULL, i_char, *psz_line_start; |
|---|
| 867 | 872 | int i_string_length; |
|---|
| 868 | 873 | char *psz_string; |
|---|
| … | … | |
| 951 | 956 | |
|---|
| 952 | 957 | p_fribidi_string = malloc( (i_string_length + 1) * sizeof(uint32_t) ); |
|---|
| | 958 | if( !p_fribidi_string ) |
|---|
| | 959 | { |
|---|
| | 960 | msg_Err( p_filter, "out of memory" ); |
|---|
| | 961 | goto error; |
|---|
| | 962 | } |
|---|
| 953 | 963 | |
|---|
| 954 | 964 | /* Do bidi conversion line-by-line */ |
|---|
| … | … | |
| 1150 | 1160 | |
|---|
| 1151 | 1161 | p_new = malloc( sizeof( font_stack_t ) ); |
|---|
| | 1162 | if( !p_new ) |
|---|
| | 1163 | return VLC_ENOMEM; |
|---|
| | 1164 | |
|---|
| 1152 | 1165 | p_new->p_next = NULL; |
|---|
| 1153 | 1166 | |
|---|
| … | … | |
| 1280 | 1293 | |
|---|
| 1281 | 1294 | p_fribidi_string = malloc( (i_string_length + 1) * sizeof(uint32_t) ); |
|---|
| | 1295 | if( !p_fribidi_string ) |
|---|
| | 1296 | { |
|---|
| | 1297 | msg_Err( p_filter, "out of memory" ); |
|---|
| | 1298 | free( psz_unicode ); |
|---|
| | 1299 | return NULL; |
|---|
| | 1300 | } |
|---|
| 1282 | 1301 | |
|---|
| 1283 | 1302 | /* Do bidi conversion line-by-line */ |
|---|