From 3bd4babd4714dfc147a4b8ffc8f757ff569dabcb Mon Sep 17 00:00:00 2001 From: Rokas <54796687+iadbbwarln@users.noreply.github.com> Date: Sun, 12 Apr 2020 09:52:46 +0300 Subject: [PATCH] fix runtime error: "free(): invalid pointer" This spotted on Debian 10 amd64, running Joshua Tutorial --- symal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symal.cpp b/symal.cpp index c56f5a5..11b1cf1 100644 --- a/symal.cpp +++ b/symal.cpp @@ -507,7 +507,7 @@ int main(int argc, char** argv) delete inp; } if (out != &std::cout) { - delete inp; + delete out; } } catch (const std::exception &e) { cerr << e.what() << std::endl;