projects
/
platform
/
core
/
ml
/
nntrainer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ef7285
)
[Coverity] Fix Coverity issue
author
Donghak PARK
<donghak.park@samsung.com>
Tue, 19 Sep 2023 08:29:22 +0000
(17:29 +0900)
committer
Jijoong Moon
<jijoong.moon@samsung.com>
Thu, 21 Sep 2023 09:03:20 +0000
(18:03 +0900)
Fix may be NULL and is dereferenced at blas_neon.cpp
Check NULL if failed to malloc
Signed-off-by: Donghak PARK <donghak.park@samsung.com>
nntrainer/tensor/blas_neon.cpp
patch
|
blob
|
history
diff --git
a/nntrainer/tensor/blas_neon.cpp
b/nntrainer/tensor/blas_neon.cpp
index fe0183dba9e7a026f30f6bef6d0e08b49869d595..4dfe007845800802551fb3fcddd79b57e9176e87 100644
(file)
--- 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) {