summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2017-08-03 18:52:50 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2017-08-03 18:52:50 +0900
commite0758304757723ae7146dc761a2430aecda609ed (patch)
tree04d454ab30f4d71c7d049eb720bd882642aa2958
parenta24b44bfe682fb41442920268dc3630e5833c120 (diff)
downloadlaunchpad-e0758304757723ae7146dc761a2430aecda609ed.tar.gz
launchpad-e0758304757723ae7146dc761a2430aecda609ed.tar.bz2
launchpad-e0758304757723ae7146dc761a2430aecda609ed.zip
Change-Id: I87aec1626f405502215e6c80923bce856963c834 Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--src/loader_info.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/loader_info.c b/src/loader_info.c
index f383f0a..29d52b5 100644
--- a/src/loader_info.c
+++ b/src/loader_info.c
@@ -44,7 +44,13 @@
static loader_info_t *__create_loader_info()
{
- loader_info_t *info = malloc(sizeof(loader_info_t));
+ loader_info_t *info;
+
+ info = malloc(sizeof(loader_info_t));
+ if (info == NULL) {
+ _E("Out of memory");
+ return NULL;
+ }
info->type = 0;
info->name = NULL;
@@ -180,6 +186,8 @@ static GList *__parse_file(GList *list, const char *path)
list = g_list_append(list, cur_info);
}
cur_info = __create_loader_info();
+ if (!cur_info)
+ break;
continue;
}