Index: src/execution.cc |
=================================================================== |
--- src/execution.cc (revision 5717) |
+++ src/execution.cc (working copy) |
@@ -797,6 +797,7 @@ |
if (result && !string->IsSymbol()) { |
i::ExternalStringTable::AddString(*string); |
} |
+ if (!result) delete resource; |
} else { |
uc16* data = new uc16[string->length()]; |
String::WriteToFlat(*string, data, 0, string->length()); |
@@ -806,6 +807,7 @@ |
if (result && !string->IsSymbol()) { |
i::ExternalStringTable::AddString(*string); |
} |
+ if (!result) delete resource; |
} |
if (!result) { |
return v8::ThrowException(v8::String::New("externalizeString() failed.")); |