projects
/
platform
/
upstream
/
elementary.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b3c8a5
)
layout: Add NULL check for calloc memory allocation.
author
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 15 Jun 2015 06:39:02 +0000
(15:39 +0900)
committer
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 15 Jun 2015 06:39:02 +0000
(15:39 +0900)
src/lib/elm_layout.c
patch
|
blob
|
history
diff --git
a/src/lib/elm_layout.c
b/src/lib/elm_layout.c
index
2dc2567
..
9b60e4b
100644
(file)
--- a/
src/lib/elm_layout.c
+++ b/
src/lib/elm_layout.c
@@
-1612,6
+1612,11
@@
_elm_layout_part_cursor_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part
else
{
pc = calloc(1, sizeof(*pc));
+ if (!pc)
+ {
+ ERR("failed to allocate memory!");
+ return EINA_FALSE;
+ }
pc->part = eina_stringshare_add(part_name);
pc->cursor = eina_stringshare_add(cursor);
pc->style = eina_stringshare_add("default");