Changeset cdf34ed9ffedd4cd2e0c0f529a08b9bcca94c34d
- Timestamp:
- 02/19/07 20:29:05
(2 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1171913345 +0000
- git-parent:
[9cb2370c5cde359db8d9dc9630f41da11007a639]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1171913345 +0000
- Message:
Fix a bunch of meomory object and descriptor leaks
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9cb2370 |
rcdf34ed |
|
| 271 | 271 | || var_Create (p_access, "dst-addr", VLC_VAR_STRING) |
|---|
| 272 | 272 | || var_Create (p_access, "src-addr", VLC_VAR_STRING)) |
|---|
| | 273 | { |
|---|
| | 274 | free (p_sys); |
|---|
| | 275 | free (psz_dst_addr); |
|---|
| 273 | 276 | return VLC_ENOMEM; |
|---|
| | 277 | } |
|---|
| 274 | 278 | |
|---|
| 275 | 279 | p_sys->p_thread = |
|---|
| … | … | |
| 278 | 282 | { |
|---|
| 279 | 283 | msg_Err( p_access, "out of memory" ); |
|---|
| | 284 | free (p_sys); |
|---|
| | 285 | free (psz_dst_addr); |
|---|
| 280 | 286 | return VLC_ENOMEM; |
|---|
| 281 | 287 | } |
|---|
| … | … | |
| 289 | 295 | |
|---|
| 290 | 296 | i_handle = net_ConnectDgram( p_this, psz_dst_addr, i_dst_port, -1, proto ); |
|---|
| | 297 | free (psz_dst_addr); |
|---|
| | 298 | |
|---|
| 291 | 299 | if( i_handle == -1 ) |
|---|
| 292 | 300 | { |
|---|
| 293 | 301 | msg_Err( p_access, "failed to create %s socket", protoname ); |
|---|
| | 302 | vlc_object_destroy (p_sys->p_thread); |
|---|
| | 303 | free (p_sys); |
|---|
| 294 | 304 | return VLC_EGENERIC; |
|---|
| 295 | 305 | } |
|---|
| … | … | |
| 338 | 348 | { |
|---|
| 339 | 349 | msg_Err (p_access, "cannot initialize RTCP sender"); |
|---|
| | 350 | net_Close (i_handle); |
|---|
| | 351 | vlc_object_destroy (p_sys->p_thread); |
|---|
| | 352 | free (p_sys); |
|---|
| 340 | 353 | return VLC_EGENERIC; |
|---|
| 341 | 354 | } |
|---|
| … | … | |
| 345 | 358 | { |
|---|
| 346 | 359 | msg_Err( p_access->p_sout, "cannot spawn sout access thread" ); |
|---|
| | 360 | net_Close (i_handle); |
|---|
| 347 | 361 | vlc_object_destroy( p_sys->p_thread ); |
|---|
| | 362 | free (p_sys); |
|---|
| 348 | 363 | return VLC_EGENERIC; |
|---|
| 349 | 364 | } |
|---|
| … | … | |
| 354 | 369 | |
|---|
| 355 | 370 | p_access->pf_seek = Seek; |
|---|
| 356 | | |
|---|
| 357 | | free( psz_dst_addr ); |
|---|
| 358 | 371 | |
|---|
| 359 | 372 | /* update p_sout->i_out_pace_nocontrol */ |
|---|