Skip to content

Commit d77f0c7

Browse files
hs0225daeyeon
authored andcommitted
fix: fix minor correction
Signed-off-by: Hosung Kim [email protected]
1 parent b777080 commit d77f0c7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

include/lwnode/nd-vm-main-message-port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class MainMessagePort {
4343

4444
private:
4545
std::shared_ptr<Port> port_;
46-
Escargot::ContextRef* context_;
47-
uv_loop_t* uv_loop_;
46+
Escargot::ContextRef* context_{nullptr};
47+
uv_loop_t* uv_loop_{nullptr};
4848

4949
struct Internal;
5050
std::unique_ptr<Internal> internal_;

src/lwnode/lwnode-loader.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ FileData SourceReader::read(std::string filename, const Encoding encodingHint) {
212212

213213
size_t bufferSize = (size_t)pos;
214214
uint8_t* buffer = (uint8_t*)allocateStringBuffer(bufferSize + 1);
215+
if (!buffer) {
216+
return FileData();
217+
}
215218
buffer[bufferSize] = '\0';
216219

217220
std::unique_ptr<void, std::function<void(void*)>> bufferHolder(

0 commit comments

Comments
 (0)