summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2015-06-15 15:39:02 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2015-06-15 15:39:02 +0900
commit222b87d41baf19dc61de6febed366a6db2b847f0 (patch)
tree1fd8834ce6f54c7fa69389f8b0497b048e37c5f4
parent5b3c8a5dc1630cb75558e5d9c97e4d8d91e7ce42 (diff)
layout: Add NULL check for calloc memory allocation.
-rw-r--r--src/lib/elm_layout.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index 2dc2567cd..9b60e4b9d 100644
--- 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
1612 else 1612 else
1613 { 1613 {
1614 pc = calloc(1, sizeof(*pc)); 1614 pc = calloc(1, sizeof(*pc));
1615 if (!pc)
1616 {
1617 ERR("failed to allocate memory!");
1618 return EINA_FALSE;
1619 }
1615 pc->part = eina_stringshare_add(part_name); 1620 pc->part = eina_stringshare_add(part_name);
1616 pc->cursor = eina_stringshare_add(cursor); 1621 pc->cursor = eina_stringshare_add(cursor);
1617 pc->style = eina_stringshare_add("default"); 1622 pc->style = eina_stringshare_add("default");