mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
Avoid freeing an operand twice.
Due to the way operands are used, they can be freed twice in dead-statement removal. Detect the double-free and ignore it.
This commit is contained in:
parent
28f4de94d2
commit
17a9dff769
1 changed files with 6 additions and 0 deletions
|
@ -182,6 +182,12 @@ new_operand (op_type_e op)
|
|||
static void
|
||||
free_operand (operand_t *op)
|
||||
{
|
||||
if (op->next) {
|
||||
//FIXME this should be an error, but due to the way operands are use,
|
||||
//it can happen.
|
||||
debug (0, "free_operand: double free");
|
||||
return;
|
||||
}
|
||||
op->next = free_operands;
|
||||
free_operands = op;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue