Init pstat->sm to NULL 18/211018/2
authorAleksey Volkov <a.volkov@samsung.com>
Tue, 16 Jul 2019 06:52:30 +0000 (09:52 +0300)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 1 Aug 2019 23:09:48 +0000 (08:09 +0900)
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/542/commits/732215dde47f1ed69461f874707b38c98b518d08
(cherry-picked from 732215dde47f1ed69461f874707b38c98b518d08)

Change-Id: I6efcc7a268fa9027ac1b080ce865ef7cd4020372
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
resource/csdk/security/src/pstatresource.c

index f9834d1..ceb8949 100644 (file)
@@ -282,6 +282,7 @@ static OCStackResult CBORPayloadToPstatBin(const uint8_t *cborPayload, const siz
 
     pstat = (OicSecPstat_t *)OICCalloc(1, sizeof(OicSecPstat_t));
     VERIFY_NON_NULL(TAG, pstat, ERROR);
+    pstat->sm = NULL;
 
     cborFindResult = cbor_value_map_find_value(&pstatCbor, OIC_JSON_ISOP_NAME, &pstatMap);
     if (CborNoError == cborFindResult && cbor_value_is_boolean(&pstatMap))