Fix initialization in PKIX
authorDmitriy Zhuravlev <d.zhuravlev@samsung.com>
Wed, 9 Mar 2016 12:40:59 +0000 (14:40 +0200)
committerRandeep Singh <randeep.s@samsung.com>
Wed, 9 Mar 2016 13:10:20 +0000 (13:10 +0000)
Change-Id: I752659624cba73d138936d1038913dd7ba19825d
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5633
Reviewed-by: Ivan Pazderskyy <i.pazderskyy@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Tested-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 2506e7409d77db6617450aac41339462a9d93774)
Reviewed-on: https://gerrit.iotivity.org/gerrit/5635

resource/csdk/connectivity/src/adapter_util/pkix/sn_store.c

index 3eff6c9..f3db429 100644 (file)
@@ -58,8 +58,8 @@ void FreeSNStore(void)
 PKIError StoreSerialNumber(const ByteArray sn)
 {
     FUNCTION_INIT(
-        CHECK_NULL(sn.data, PKI_NULL_PASSED);
         uint8_t *temp = NULL;
+        CHECK_NULL(sn.data, PKI_NULL_PASSED);
     );
     if (Store.array.len == 0 || Store.array.len + sn.len + 1 > CRL_BLOCK_LEN * Store.blockNumber)
     {