avutil/pca: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/68/head
Michael Niedermayer 11 years ago
parent 35e16b1bab
commit beecfa81ac
  1. 2
      libavutil/pca.c

@ -42,7 +42,7 @@ PCA *ff_pca_init(int n){
pca= av_mallocz(sizeof(*pca));
pca->n= n;
pca->z = av_malloc(sizeof(*pca->z) * n);
pca->z = av_malloc_array(n, sizeof(*pca->z));
pca->count=0;
pca->covariance= av_calloc(n*n, sizeof(double));
pca->mean= av_calloc(n, sizeof(double));

Loading…
Cancel
Save