Changeset b5bef11 for python/ext/aubiomodule.c
- Timestamp:
- Apr 21, 2016, 9:31:10 PM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- a7f398d
- Parents:
- bfe8256
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubiomodule.c
rbfe8256 rb5bef11 96 96 } 97 97 98 vec = PyAubio_ArrayToCFvec (input);99 100 if (vec == NULL) {98 vec = (fvec_t *)malloc(sizeof(fvec_t)); 99 if (!PyAubio_ArrayToCFvec(input, vec)) { 100 free(vec); 101 101 return NULL; 102 102 } … … 104 104 // compute the function 105 105 result = Py_BuildValue ("f", fvec_alpha_norm (vec, alpha)); 106 free(vec); 106 107 if (result == NULL) { 107 108 return NULL; … … 186 187 } 187 188 188 vec = PyAubio_ArrayToCFvec (input);189 190 if (vec == NULL) {189 vec = (fvec_t *)malloc(sizeof(fvec_t)); 190 if (!PyAubio_ArrayToCFvec(input, vec)) { 191 free(vec); 191 192 return NULL; 192 193 } … … 194 195 // compute the function 195 196 result = Py_BuildValue ("f", aubio_zero_crossing_rate (vec)); 197 free(vec); 196 198 if (result == NULL) { 197 199 return NULL; … … 215 217 } 216 218 217 vec = PyAubio_ArrayToCFvec (input);218 219 if (vec == NULL) {219 vec = (fvec_t *)malloc(sizeof(fvec_t)); 220 if (!PyAubio_ArrayToCFvec(input, vec)) { 221 free(vec); 220 222 return NULL; 221 223 }
Note: See TracChangeset
for help on using the changeset viewer.