Changeset 303e9b5405a9a4c0e9c428425a224d65797d6c18
- Timestamp:
- 03/08/08 19:42:19
(4 months ago)
- Author:
- Rémi Duraffort <ivoire@videolan.org>
- git-committer:
- Rémi Duraffort <ivoire@videolan.org> 1217785339 +0200
- git-parent:
[9f15187610ae84720a88d2fd7b5a573fac706486]
- git-author:
- Rémi Duraffort <ivoire@videolan.org> 1217785339 +0200
- Message:
Fix memleak and bad use of a const variable.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4db9842 |
r303e9b5 |
|
| 215 | 215 | config_chain_t *p_cfg = NULL; |
|---|
| 216 | 216 | char *psz_name = NULL; |
|---|
| | 217 | char* psz_new_string; |
|---|
| 217 | 218 | |
|---|
| 218 | 219 | if( !psz_string || !*psz_string ) return 0; |
|---|
| 219 | 220 | |
|---|
| 220 | | psz_string = config_ChainCreate( &psz_name, &p_cfg, psz_string ); |
|---|
| | 221 | psz_new_string = config_ChainCreate( &psz_name, &p_cfg, psz_string ); |
|---|
| 221 | 222 | |
|---|
| 222 | 223 | filter_t *p_filter = filter_chain_AppendFilterInternal( p_chain, psz_name, |
|---|
| … | … | |
| 228 | 229 | free( psz_name ); |
|---|
| 229 | 230 | free( p_cfg ); |
|---|
| | 231 | free( psz_new_string ); |
|---|
| 230 | 232 | return -1; |
|---|
| 231 | 233 | } |
|---|
| 232 | 234 | free( psz_name ); |
|---|
| 233 | 235 | |
|---|
| 234 | | int ret = filter_chain_AppendFromStringInternal( p_chain, psz_string ); |
|---|
| | 236 | int ret = filter_chain_AppendFromStringInternal( p_chain, psz_new_string ); |
|---|
| | 237 | free( psz_new_string ); |
|---|
| 235 | 238 | if( ret < 0 ) |
|---|
| 236 | 239 | { |
|---|