From: Donghak PARK Date: Tue, 19 Sep 2023 08:29:22 +0000 (+0900) Subject: [Coverity] Fix Coverity issue X-Git-Tag: accepted/tizen/unified/20230925.160804~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0aedd589f00489a100b5c8eee9e06ebe43912ad6;p=platform%2Fcore%2Fml%2Fnntrainer.git [Coverity] Fix Coverity issue Fix may be NULL and is dereferenced at blas_neon.cpp Check NULL if failed to malloc Signed-off-by: Donghak PARK --- diff --git a/nntrainer/tensor/blas_neon.cpp b/nntrainer/tensor/blas_neon.cpp index fe0183db..4dfe0078 100644 --- a/nntrainer/tensor/blas_neon.cpp +++ b/nntrainer/tensor/blas_neon.cpp @@ -247,10 +247,6 @@ void sgemv_transpose_neon(const float *A, const float *X, float *Y, } else if (cols % 4 == 0) { unsigned int n = cols / 4; bool *initialized = (bool *)malloc(sizeof(bool) * n); - if (initialized == nullptr) { - ml_loge("failed to malloc"); - return; - } unsigned int step; for (unsigned int i = 0; i < cols / 4; ++i) {