From: Jooseok Park Date: Wed, 19 Jul 2017 12:52:01 +0000 (+0900) Subject: Add calloc fail check X-Git-Tag: submit/tizen/20170721.003607^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=436f285aecd46546c0ab6fc37458025c784b1e75;p=platform%2Fcore%2Fiot%2Fiotcon.git Add calloc fail check Change-Id: Ibfefe7b01e90d4b4a766f9f0bb9564439cb400e6 --- diff --git a/src/ic-ioty-ocprocess.c b/src/ic-ioty-ocprocess.c index 284b067..2b30f53 100644 --- a/src/ic-ioty-ocprocess.c +++ b/src/ic-ioty-ocprocess.c @@ -759,6 +759,10 @@ OCEntityHandlerResult icl_ioty_ocprocess_request_cb(OCEntityHandlerFlag flag, req->oic_resource_h = request->resource; icl_request_container_s *req_container = calloc(1, sizeof(icl_request_container_s)); + if (NULL == req_container) { + ERR("calloc() Fail(%d)", errno); + return OC_EH_ERROR; + } req_container->request = req; req_container->resource = resource;