Fix static analysis issue in keepalive
Fix static analysis issue in keepalive

- add return value checking logic after memory allocation

Change-Id: I1c28e13e01c2dd7bf4b78585adf0ffdc0e6ecdfd
Signed-off-by: Minji Park <fd0fc0793b4bd46c55c808ba6e6601003cdd0ec2@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14935
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Uze Choi <3a26c91d8a4a3c9e246e43339f4782bb2483aece@samsung.com>
Reviewed-by: Jaehong Jo <69db334b3f87f30654728856fde276b43c835fe5@samsung.com>
Reviewed-by: Phil Coval <ff46fec9739d31cce915aabcc3a7a2c00eee4d6c@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <72ac47ef856ca3d131a57cba474ebed48591eeff@samsung.com>
(cherry picked from commit 64b44c48ab8944c7cae1cabf64aa0e1e98ada932)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15339
Reviewed-by: jihwan seo <69598d7552022c520cfdbefd16641727c7ff4ab5@samsung.com>

rzr/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity