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:
7012b1d
)
Svace fix
86/248686/1
accepted/tizen_5.5_unified
tizen_5.5
accepted/tizen/5.5/unified/20201222.072914
submit/tizen_5.5/20201222.030654
author
lokilee73
<changjoo.lee@samsung.com>
Tue, 1 Dec 2020 07:48:35 +0000
(16:48 +0900)
committer
Hyotaek Shim
<hyotaek.shim@samsung.com>
Tue, 1 Dec 2020 10:35:50 +0000
(10:35 +0000)
Add exceptional code for calloc failure.
Change-Id: I712e31a83ca213e9eb1f4d0aa5b660f4124b8d34
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
(cherry picked from commit
bcfd7f9cf0aef76ca98796078ad4f8e66f0a1589
)
(cherry picked from commit
37e6fc52678d844db4af469b25198d7982f5e7b6
)
hw/ir/ir.c
patch
|
blob
|
history
diff --git
a/hw/ir/ir.c
b/hw/ir/ir.c
index ec06a92e67fc13d505f927aa86eddd351e39c486..ffb08b05a51931950868629c8e19d90ff542a82f 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);