Skip to content

Commit 00364c7

Browse files
authored
Fix getMany() memory leak (#9)
Ref Level/rocksdb#192 Ref Level/leveldown#790
1 parent aa975de commit 00364c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

binding.cc

+1
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ static std::vector<std::string>* KeyArray (napi_env env, napi_value arr) {
285285
StringOrBufferLength(env, element) >= 0) {
286286
LD_STRING_OR_BUFFER_TO_COPY(env, element, to);
287287
result->emplace_back(toCh_, toSz_);
288+
delete [] toCh_;
288289
}
289290
}
290291
}

0 commit comments

Comments
 (0)