Changeset 60672abc1c666289ee98f13f3b5ef9ee22c1e05e
- Timestamp:
- 28/11/06 21:27:33
(2 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1164745653 +0000
- git-parent:
[a9ac3e9e17a136f4114f27f99dae976a81bac7e2]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1164745653 +0000
- Message:
Avoid duplicate memory allocation
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra9ac3e9 |
r60672ab |
|
| 394 | 394 | const char *entry = pp_dir_content[i]; |
|---|
| 395 | 395 | int i_size_entry = strlen( psz_name ) + |
|---|
| 396 | | strlen( entry ) + 2; |
|---|
| | 396 | strlen( entry ) + 2 + 7 /* strlen("file://") */; |
|---|
| 397 | 397 | char psz_uri[i_size_entry]; |
|---|
| 398 | | char psz_mrl[i_size_entry + 7]; /* "file://psz_uri" */ |
|---|
| 399 | 398 | |
|---|
| 400 | 399 | sprintf( psz_uri, "%s/%s", psz_name, entry); |
|---|
| … | … | |
| 473 | 472 | } |
|---|
| 474 | 473 | |
|---|
| 475 | | sprintf( &psz_mrl, "file://%s", psz_uri ); |
|---|
| | 474 | memmove (psz_uri + 7, psz_uri, sizeof (psz_uri) - 7); |
|---|
| | 475 | memcpy (psz_uri, "file://", 7); |
|---|
| 476 | 476 | p_input = input_ItemNewWithType( VLC_OBJECT(p_playlist), |
|---|
| 477 | | psz_mrl, entry, 0, NULL, |
|---|
| | 477 | psz_uri, entry, 0, NULL, |
|---|
| 478 | 478 | -1, ITEM_TYPE_VFILE ); |
|---|
| 479 | 479 | if (p_input != NULL) |
|---|