Update snapshot(2017-12-06)
[platform/upstream/iotivity.git] / service / easy-setup / enrollee / src / samsung / sc_easysetup.c
index 98e1eb8..5c7a2e3 100755 (executable)
@@ -76,7 +76,8 @@ static void ReadAccountData(OCRepPayload* payload,void** userdata)
             if( *userdata == NULL )
             {
                 OIC_LOG(ERROR, SC_ENROLLEE_TAG, "OICMalloc for SCDevConfProperties is failed");
-                return ;
+                OICFree(account);
+                return;
             }
         }
 
@@ -87,6 +88,7 @@ static void ReadAccountData(OCRepPayload* payload,void** userdata)
         OIC_LOG_V(INFO_PRIVATE, SC_ENROLLEE_TAG, "[User specific property] %s : %s",
                 SC_RSRVD_ES_VENDOR_ACCOUNT, pDevConfProp->account);
 
+        OICFree(account);
     }
     OIC_LOG(INFO, SC_ENROLLEE_TAG, "ReadAccountData OUT");