mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 01:50:45 +01:00
Merge pull request #1581 from saper/delete_array
Use delete[] after new[]
This commit is contained in:
commit
3d19d4ae52
1 changed files with 2 additions and 2 deletions
|
@ -22,14 +22,14 @@ NAN_METHOD(extractPublic)
|
||||||
const auto source = BIO_new_mem_buf(sourceBuf, sourceLength);
|
const auto source = BIO_new_mem_buf(sourceBuf, sourceLength);
|
||||||
if (source == nullptr) {
|
if (source == nullptr) {
|
||||||
Nan::ThrowError("Memory allocation failed");
|
Nan::ThrowError("Memory allocation failed");
|
||||||
delete sourceBuf;
|
delete[] sourceBuf;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto rsa = PEM_read_bio_RSAPrivateKey(source, nullptr, nullptr, nullptr);
|
const auto rsa = PEM_read_bio_RSAPrivateKey(source, nullptr, nullptr, nullptr);
|
||||||
|
|
||||||
BIO_free(source);
|
BIO_free(source);
|
||||||
delete sourceBuf;
|
delete[] sourceBuf;
|
||||||
|
|
||||||
if (rsa == nullptr) {
|
if (rsa == nullptr) {
|
||||||
Nan::ThrowError("Decode failed");
|
Nan::ThrowError("Decode failed");
|
||||||
|
|
Loading…
Reference in a new issue