Bug 790746
authorMike Habicher <mhabicher@mozilla.com>
Wed, 12 Sep 2012 22:24:00 -0400
changeset 110565 ace13c6f5fc080a6a096e7ca496cc6c652da5aa7
parent 110564 25b53713d89561ccb87d656c18166a911746990a
child 110566 a2bd4bc59452f34362dbb59394f7d38646542747
push idunknown
push userunknown
push dateunknown
bugs790746
milestone18.0a1
Bug 790746
dom/camera/GonkCameraManager.cpp
--- a/dom/camera/GonkCameraManager.cpp
+++ b/dom/camera/GonkCameraManager.cpp
@@ -72,22 +72,20 @@ nsDOMCameraManager::GetListOfCameras(JSC
           s.AppendPrintf("extra-camera-%d", count);
           v = JS_NewStringCopyZ(cx, s.get());
           index = extraIndex++;
         }
         break;
     }
     if (!v) {
       DOM_CAMERA_LOGE("getListOfCameras : out of memory populating camera list");
-      delete a;
       return NS_ERROR_NOT_AVAILABLE;
     }
     jv = STRING_TO_JSVAL(v);
     if (!JS_SetElement(cx, a, index, &jv)) {
       DOM_CAMERA_LOGE("getListOfCameras : failed building list of cameras");
-      delete a;
       return NS_ERROR_NOT_AVAILABLE;
     }
   }
 
   *_retval = OBJECT_TO_JSVAL(a);
   return NS_OK;
 }