soft-sensor-manager: Fix cppcheck errors
authorRavi Nanjundappa <nravi.n@samsung.com>
Mon, 3 Aug 2015 11:42:50 +0000 (17:12 +0530)
committerUze Choi <uzchoi@samsung.com>
Tue, 11 Aug 2015 04:00:22 +0000 (04:00 +0000)
This patch fixes the errors reported by cppcheck tool for
'(error) Mismatching allocation and deallocation: avg'.
Replaced delete with delete[] wherever the memory is allocated
using new [].

Change-Id: Ic32755347ad24aeb2a1c57341249038fd511073a
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2067
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/soft-sensor-manager/SoftSensorPlugin/IndoorTrajectorySensor/src/tizen_proximity.cpp

index de501cc..271452c 100644 (file)
@@ -334,7 +334,7 @@ void CProximity::GetProximity(CbleDevice *pdevice)
         }
     } // for
 
-    delete avg;
+    delete[] avg;
 }
 
 bool CProximity::set_threadFunc(workfunc func)
@@ -443,4 +443,4 @@ void CProximity::prox_first_setting( int reference_ea )
     }
 
     is_first = false;
-}
\ No newline at end of file
+}