javaextensions/bluetooth/bluetoothcommons/src.s60/servicerecord.cpp
branchRCL_3
changeset 83 26b2b12093af
parent 60 6c158198356e
--- a/javaextensions/bluetooth/bluetoothcommons/src.s60/servicerecord.cpp	Wed Sep 15 12:05:25 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/src.s60/servicerecord.cpp	Wed Oct 13 14:23:59 2010 +0300
@@ -148,7 +148,7 @@
     TPtrC8 uuidDes(uuidBytes, uuidByteLength);
     TRAPD(err, uuid.SetL(uuidDes));
 
-    delete[] uuidBytes;
+    delete uuidBytes;
     uuidBytes = NULL;
 
     if (KErrNone != err)
@@ -205,7 +205,7 @@
             char *fileName = java::util::JavaCommonUtils::wstringToUtf8(
                                  persistentFileName);
             persistentRecFd = open(fileName, O_RDONLY);
-            delete[] fileName;
+            delete fileName;
         }
         catch (ExceptionBase ex)
         {
@@ -618,7 +618,7 @@
             write(mSrvRecFd, (char *) &aDeviceServiceClasses,
                   sizeof(aDeviceServiceClasses));
 
-            delete[] fileName;
+            delete fileName;
         }
         catch (ExceptionBase ex)
         {
@@ -1286,7 +1286,7 @@
             char *fileName =
                 java::util::JavaCommonUtils::wstringToUtf8(persistentFileName);
             persistentRecFd = open(fileName, O_RDONLY);
-            delete[] fileName;
+            delete fileName;
         }
         catch (ExceptionBase ex)
         {
@@ -1310,10 +1310,7 @@
     unsigned int devServClass = 0;
     ret = read(persistentRecFd, &devServClass, sizeof(devServClass));
     if (ret <= 0)
-    {
-        delete srvRecPopulator;
         return;
-    }
 
     elementBuilder = srvRecPopulator->SetDeviceServiceClass(devServClass);