From 130ad1c21f57955ca6a2d5421368ada3f6f06048 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 1 May 2018 23:07:57 -0700 Subject: [PATCH] SCP: Fix potential error path expression evaluation memory leak (Coverity) --- scp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scp.c b/scp.c index add6dcc9..bcfd2a5c 100644 --- a/scp.c +++ b/scp.c @@ -13712,6 +13712,7 @@ while (!isempty_Stack(stack2)) { if (!pop_Stack (stack1, item1, &op1)) { *stat = SCPE_INVEXPR; + delete_Stack (stack2); return 0; } if (temp_op->unary) @@ -13721,6 +13722,7 @@ while (!isempty_Stack(stack2)) { (temp_op->string[0] != '-') && (temp_op->string[0] != '+')) { *stat = SCPE_INVEXPR; + delete_Stack (stack2); return 0; } }