From 4659946a2fb5075339101fa489251bcc7b025747 Mon Sep 17 00:00:00 2001 From: Milan Suman <> Date: Wed, 20 Jul 2022 12:13:47 +0530 Subject: [PATCH] src/test: free pointers --- src/test/javacompat.cpp | 1 + src/test/nbt_helpers.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/javacompat.cpp b/src/test/javacompat.cpp index bce53cb..08e77de 100644 --- a/src/test/javacompat.cpp +++ b/src/test/javacompat.cpp @@ -93,6 +93,7 @@ int main(){ ASSERT(exportedString == javaStdString); std::cout << "Passed Export Java string test." << std::endl; + delete nextChar; return 0; } diff --git a/src/test/nbt_helpers.cpp b/src/test/nbt_helpers.cpp index 73885a2..6189b83 100644 --- a/src/test/nbt_helpers.cpp +++ b/src/test/nbt_helpers.cpp @@ -494,6 +494,6 @@ int main(){ ASSERT(NBT::helper::readString(reinterpret_cast(javaStdString.data()), 0xFFFFF, 0).errorCode == ErrorCodes::OVERRUN); ASSERT(NBT::helper::readString(reinterpret_cast(javaStdString.data()), 0xF, 0).errorCode == ErrorCodes::MISMATCHEDSIZE); std::cout << "Passed readString NBT helper test." << std::endl; - + delete nextChar; return 0; }