Skip to content

Commit

Permalink
avutil/pca: Use av_malloc_array()
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed May 4, 2014
1 parent 35e16b1 commit beecfa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavutil/pca.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit beecfa8

Please sign in to comment.