Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 51979d1

Browse files
authored
Fix getMany() memory leak (#804)
Ref Level/rocksdb#192 Ref #790
1 parent 4f6b2ff commit 51979d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

binding.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ static std::vector<std::string>* KeyArray (napi_env env, napi_value arr) {
260260
StringOrBufferLength(env, element) > 0) {
261261
LD_STRING_OR_BUFFER_TO_COPY(env, element, to);
262262
result->emplace_back(toCh_, toSz_);
263+
delete [] toCh_;
263264
}
264265
}
265266
}

0 commit comments

Comments
 (0)