Changeset b75e05005079f7a655822de0bb1b4209e4c9db18
- Timestamp:
- 08/30/07 23:30:59
(1 year ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1188509459 +0000
- git-parent:
[6fdd1765b76ce1414cb0a1d13b790b2b26b08288]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1188509459 +0000
- Message:
Fix one memleak and a few unused result warnings
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9e595c9 |
rb75e050 |
|
| 395 | 395 | } |
|---|
| 396 | 396 | |
|---|
| 397 | | if( psz_name == NULL ) |
|---|
| 398 | | psz_name = strdup( "Unknown" ); |
|---|
| 399 | | |
|---|
| 400 | | asprintf( &p_sys->psz_file, "%s %d-%d-%d %.2dh%.2dm%.2ds.%s", |
|---|
| 401 | | psz_name, |
|---|
| 402 | | l.tm_mday, l.tm_mon+1, l.tm_year+1900, |
|---|
| 403 | | l.tm_hour, l.tm_min, l.tm_sec, |
|---|
| 404 | | p_sys->psz_ext ); |
|---|
| | 397 | if( asprintf( &p_sys->psz_file, "%s %d-%d-%d %.2dh%.2dm%.2ds.%s", |
|---|
| | 398 | ( psz_name != NULL ) ? psz_name : "Unknown", |
|---|
| | 399 | l.tm_mday, l.tm_mon+1, l.tm_year+1900, |
|---|
| | 400 | l.tm_hour, l.tm_min, l.tm_sec, |
|---|
| | 401 | p_sys->psz_ext ) == -1 ) |
|---|
| | 402 | p_sys->psz_file = NULL; |
|---|
| 405 | 403 | |
|---|
| 406 | 404 | free( psz_name ); |
|---|
| | 405 | if( p_sys->psz_file == NULL ) |
|---|
| | 406 | { |
|---|
| | 407 | p_sys->b_dump = VLC_FALSE; |
|---|
| | 408 | return; |
|---|
| | 409 | } |
|---|
| 407 | 410 | |
|---|
| 408 | 411 | /* Remove all forbidden characters (except (back)slashes) */ |
|---|
| … | … | |
| 423 | 426 | } |
|---|
| 424 | 427 | |
|---|
| 425 | | psz_name=strdup(p_sys->psz_file); |
|---|
| | 428 | psz_name = p_sys->psz_file; |
|---|
| 426 | 429 | |
|---|
| 427 | 430 | #if defined (WIN32) || defined (UNDER_CE) |
|---|
| … | … | |
| 430 | 433 | #define DIR_SEP "/" |
|---|
| 431 | 434 | #endif |
|---|
| 432 | | asprintf(&p_sys->psz_file, "%s" DIR_SEP "%s", |
|---|
| 433 | | p_sys->psz_path, psz_name); |
|---|
| 434 | | free(psz_name); |
|---|
| | 435 | if( asprintf( &p_sys->psz_file, "%s" DIR_SEP "%s", |
|---|
| | 436 | p_sys->psz_path, psz_name ) == -1 ) |
|---|
| | 437 | p_sys->psz_file = NULL; |
|---|
| | 438 | free( psz_name ); |
|---|
| | 439 | if( p_sys->psz_file == NULL ) |
|---|
| | 440 | { |
|---|
| | 441 | p_sys->b_dump = VLC_FALSE; |
|---|
| | 442 | return; |
|---|
| | 443 | } |
|---|
| 435 | 444 | |
|---|
| 436 | 445 | msg_Dbg( p_access, "dump in file '%s'", p_sys->psz_file ); |
|---|