efl_ui_position_manager_list: add NULL check for memory allocation
authorYeongjong Lee <yj34.lee@samsung.com>
Wed, 12 Feb 2020 07:45:40 +0000 (16:45 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 12 Feb 2020 21:11:39 +0000 (06:11 +0900)
Reviewers: Jaehyun_Cho, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11312

src/lib/elementary/efl_ui_position_manager_list.c

index 6424b4b..dd90b12 100644 (file)
@@ -69,6 +69,7 @@ cache_require(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd)
      }
 
    pd->size_cache = calloc(pd->size + 1, sizeof(int));
+   if (!pd->size_cache) return;
    pd->size_cache[0] = 0;
    pd->maximum_min_size = 0;