elm_prefs_data: add null checking after memory allocation 55/143255/2
authorJaeun Choi <jaeun12.choi@samsung.com>
Wed, 9 Aug 2017 07:36:13 +0000 (16:36 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 11 Aug 2017 02:06:41 +0000 (02:06 +0000)
Change-Id: Ia14b6585a030fe598a9e09dc16ddc27dd1d789df
origin: upstream (38abae53c0a5aca320984475c82fc6f6f5ae048b)

src/lib/elm_prefs_data.c

index 749c044..19aea68 100644 (file)
@@ -234,6 +234,8 @@ _eet_data_load(Elm_Prefs_Data *prefs_data,
    EINA_LIST_FREE(values->values, it)
      {
         Elm_Prefs_Data_Item *item = malloc(sizeof(*item));
+        if (!item) continue;
+
         Eina_Bool skip        = EINA_FALSE;
         Eina_Bool set_err     = EINA_FALSE;
         Eina_Bool setup_err   = EINA_FALSE;