projects
/
platform
/
adaptation
/
samsung_exynos
/
device-manager-plugin-exynos5433.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
357f910
)
Svace fix
54/248654/1
accepted/tizen/unified/20201222.122549
submit/tizen/20201222.014224
submit/tizen/20201222.014453
author
lokilee73
<changjoo.lee@samsung.com>
Tue, 1 Dec 2020 07:48:35 +0000
(16:48 +0900)
committer
lokilee73
<changjoo.lee@samsung.com>
Tue, 1 Dec 2020 07:48:39 +0000
(16:48 +0900)
Add exceptional code for calloc failure.
Change-Id: I712e31a83ca213e9eb1f4d0aa5b660f4124b8d34
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
hw/ir/ir.c
patch
|
blob
|
history
diff --git
a/hw/ir/ir.c
b/hw/ir/ir.c
index
ec06a92
..
ffb08b0
100644
(file)
--- a/
hw/ir/ir.c
+++ b/
hw/ir/ir.c
@@
-88,6
+88,9
@@
static int ir_transmit(int *frequency_pattern, int size)
len = (size - 1) * 4;
j = 0;
pattern = (uint8_t *)calloc(1, sizeof(uint8_t) * len);
+ if (!pattern)
+ return -ENOMEM;
+
for (i = 1; i < size; i++) {
pattern[j] = (uint8_t)(((unsigned int)frequency_pattern[i]) >> 0);
pattern[++j] = (uint8_t)(((unsigned int)frequency_pattern[i]) >> 8);