summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormk5004.lee <mk5004.lee@samsung.com>2018-03-14 11:36:00 +0900
committermk5004.lee <mk5004.lee@samsung.com>2018-03-14 11:36:51 +0900
commit3a63563fd6c13442f9fbeda970f8c9a8629f7db6 (patch)
tree04655d7df909415199329ff35680d6c082320128
parentf249b2721cb0f6196a19474623bf7e12b880f1d3 (diff)
downloadbundle-3a63563fd6c13442f9fbeda970f8c9a8629f7db6.tar.gz
bundle-3a63563fd6c13442f9fbeda970f8c9a8629f7db6.tar.bz2
bundle-3a63563fd6c13442f9fbeda970f8c9a8629f7db6.zip
Check return value
Change-Id: I29be7cf904e13762cb799aabbb2d89b215c1fc47 Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
-rw-r--r--src/bundle_json.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bundle_json.c b/src/bundle_json.c
index 3f11e3b..8dad013 100644
--- a/src/bundle_json.c
+++ b/src/bundle_json.c
@@ -136,6 +136,9 @@ static void __add_bundle_data_from_json(JsonObject *object,
node_type = JSON_NODE_TYPE(node);
if (node_type == JSON_NODE_ARRAY) {
json_arr = json_node_get_array(node);
+ if (json_arr == NULL)
+ return;
+
len = json_array_get_length(json_arr);
arr_val = (char **)calloc(1, sizeof(char *) * len);