From 58bc6b1f57a610035351682d27e000e4b15f7ee4 Mon Sep 17 00:00:00 2001 From: Simplxs Date: Fri, 10 May 2024 18:04:39 +0800 Subject: [PATCH] fix memory leak --- src/sign.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sign.cpp b/src/sign.cpp index c3b4445..abd607d 100644 --- a/src/sign.cpp +++ b/src/sign.cpp @@ -150,5 +150,7 @@ std::tuple Sign::Call(const std::string_v std::string extraDataHex = Bin2Hex(signResult + 256, *(signResult + ExtraOffsets)); std::string tokenDataHex = Bin2Hex(signResult, *(signResult + TokenOffsets)); + delete[] signResult; + return std::make_tuple(signDataHex, extraDataHex, tokenDataHex); } \ No newline at end of file