mirror of https://gitee.com/bigwinds/arangodb
fixed leak
This commit is contained in:
parent
546ffce3ed
commit
d2001b6c0a
|
@ -1613,6 +1613,8 @@ static void JS_Load(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
||||||
TRI_V8_PAIR_STRING(content, length),
|
TRI_V8_PAIR_STRING(content, length),
|
||||||
filename->ToString(), false);
|
filename->ToString(), false);
|
||||||
|
|
||||||
|
TRI_FreeString(TRI_UNKNOWN_MEM_ZONE, content);
|
||||||
|
|
||||||
// restore old values for __dirname and __filename
|
// restore old values for __dirname and __filename
|
||||||
if (oldFilename.IsEmpty() || oldFilename->IsUndefined()) {
|
if (oldFilename.IsEmpty() || oldFilename->IsUndefined()) {
|
||||||
current->Delete(TRI_V8_ASCII_STRING("__filename"));
|
current->Delete(TRI_V8_ASCII_STRING("__filename"));
|
||||||
|
@ -1636,7 +1638,6 @@ static void JS_Load(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRI_FreeString(TRI_UNKNOWN_MEM_ZONE, content);
|
|
||||||
TRI_V8_RETURN(result);
|
TRI_V8_RETURN(result);
|
||||||
TRI_V8_TRY_CATCH_END
|
TRI_V8_TRY_CATCH_END
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue