projects
/
platform
/
core
/
uifw
/
libtbm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a80622a
)
Use calloc instead of malloc to set memory zero.
73/39373/3
author
Seunghun Lee
<shiin.lee@samsung.com>
Thu, 14 May 2015 02:25:42 +0000
(11:25 +0900)
committer
SooChan Lim
<sc1.lim@samsung.com>
Wed, 3 Jun 2015 04:48:27 +0000
(21:48 -0700)
This patch is to avoid segmentation fault.
all of member valuable should be zero before check if valid.
Change-Id: Icc1b6a9e5be21a57d4346c9c2dbefb6cce3a0fd6
Signed-off-by: Seunghun Lee <shiin.lee@samsung.com>
src/tbm_wayland.c
patch
|
blob
|
history
diff --git
a/src/tbm_wayland.c
b/src/tbm_wayland.c
index
ed1de1a
..
1a0a541
100644
(file)
--- a/
src/tbm_wayland.c
+++ b/
src/tbm_wayland.c
@@
-116,7
+116,7
@@
create_display(void)
struct display *display;
drm_magic_t magic;
- display =
malloc(sizeof *display
);
+ display =
calloc(sizeof(struct display), 1
);
if (display == NULL) {
TBM_LOG ("[libtbm:%d] out of memory\n", getpid());
return NULL;