2007-10-21 Mark Rowe <mrowe@apple.com>
[WebKit-https.git] / JavaScriptCore / kjs / array_object.cpp
index 3b0df6a4b5ff96204dade213d868394260cb3073..156634ab5573112d67d55d18ef988c3a5df88778 100644 (file)
@@ -75,7 +75,8 @@ static inline void reallocateStorage(JSValue**& storage, size_t newCapacity)
 
 static inline void freeStorage(JSValue** storage)
 {
-  fastFree(storage - 2);
+    if (storage)
+        fastFree(storage - 2);
 }
 
 ArrayInstance::ArrayInstance(JSObject *proto, unsigned initialLength)