We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
buf
1 parent 1ad8bed commit bfa84ccCopy full SHA for bfa84cc
c-dependencies/js-compute-runtime/builtins/crypto-algorithm.cpp
@@ -743,12 +743,14 @@ namespace {
743
// 2. If performing the operation results in an error, then throw an OperationError.
744
// TODO: Change to an OperationError DOMException
745
JS_ReportErrorUTF8(cx, "SubtleCrypto.digest: failed to create digest");
746
+ JS_free(cx, buf);
747
return nullptr;
748
}
749
// 3. Return a new ArrayBuffer containing result.
750
JS::RootedObject array_buffer(cx);
751
array_buffer.set(JS::NewArrayBufferWithContents(cx, size, buf));
752
if (!array_buffer) {
753
754
JS_ReportOutOfMemory(cx);
755
756
0 commit comments