mirror of
https://github.com/simh/simh.git
synced 2026-01-14 07:39:29 +00:00
SCP: Fix potential error path expression evaluation memory leak (Coverity)
This commit is contained in:
parent
4e508cfc29
commit
130ad1c21f
2
scp.c
2
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user