Merge "Implement functionality to set PSK credentials for DTLS in OC stack."
[platform/upstream/iotivity.git] / resource / csdk / stack / src / ocstack.c
index 67bbb68..2738c96 100644 (file)
@@ -72,6 +72,11 @@ OCDeviceEntityHandler defaultDeviceHandler;
 //TODO: we should allow the server to define this
 #define MAX_OBSERVE_AGE (0x2FFFFUL)
 //-----------------------------------------------------------------------------
+// Externs
+//-----------------------------------------------------------------------------
+extern void DeinitOCSecurityInfo();
+
+//-----------------------------------------------------------------------------
 // Internal API function
 //-----------------------------------------------------------------------------
 
@@ -451,6 +456,9 @@ OCStackResult OCStop()
         result = OC_STACK_ERROR;
     }
 
+    // Deinit security blob
+    DeinitOCSecurityInfo();
+
     if (result != OC_STACK_OK) {
         OC_LOG(ERROR, TAG, PCF("Stack stop error"));
     }