Changeset 571c3e12bbc8ee80a8cbeda3df13c8fd7c303fa7
- Timestamp:
- 03/25/08 10:53:13
(4 months ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1206438793 +0100
- git-parent:
[1bab8298647c6facaa01c7b54ff3d4a86dfed513]
- git-author:
- Rafaël Carré <funman@videolan.org> 1206438793 +0100
- Message:
python bindings : fix pyoptions_to_args and a memleak in the same time
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rac5fe54 |
r571c3e1 |
|
| 29 | 29 | Py_ssize_t i_size; |
|---|
| 30 | 30 | Py_ssize_t i_index; |
|---|
| 31 | | char** ppsz_args = *pppsz_args; |
|---|
| 32 | | |
|---|
| 33 | | ppsz_args = NULL; |
|---|
| 34 | 31 | |
|---|
| 35 | 32 | Py_INCREF( py_options ); |
|---|
| … | … | |
| 40 | 37 | } |
|---|
| 41 | 38 | i_size = PySequence_Size( py_options ); |
|---|
| 42 | | ppsz_args = malloc( ( i_size + 1 ) * sizeof( char * ) ); |
|---|
| | 39 | |
|---|
| | 40 | char **ppsz_args = *pppsz_args = malloc( ( i_size + 1 ) * sizeof( char * ) ); |
|---|
| | 41 | |
|---|
| 43 | 42 | if( ! ppsz_args ) |
|---|
| 44 | 43 | { |
|---|