projects
/
platform
/
core
/
api
/
device.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8815c6a
)
haptic: Check malloc() failed
77/148477/1
accepted/tizen/4.0/unified/20170911.154334
submit/tizen_4.0/20170908.052732
author
pr.jung
<pr.jung@samsung.com>
Fri, 8 Sep 2017 03:04:38 +0000
(12:04 +0900)
committer
pr.jung
<pr.jung@samsung.com>
Fri, 8 Sep 2017 03:04:38 +0000
(12:04 +0900)
Change-Id: I206f3252a969422a2da0cf683f31c45d2112cde2
Signed-off-by: pr.jung <pr.jung@samsung.com>
src/haptic.c
patch
|
blob
|
history
diff --git
a/src/haptic.c
b/src/haptic.c
index
2fcf096
..
10704b5
100644
(file)
--- a/
src/haptic.c
+++ b/
src/haptic.c
@@
-137,6
+137,11
@@
int device_haptic_open(int device_index, haptic_device_h *device_handle)
if (!found) {
handle = (struct haptic_handle *)malloc(sizeof(struct haptic_handle));
+ if (!handle) {
+ _E("Failed to malloc");
+ return DEVICE_ERROR_OPERATION_FAILED;
+ }
+
handle->handle = ret;
handle->index = device_index;
DD_LIST_APPEND(handle_list, handle);