get rid of references to freed code.

This commit is contained in:
Vitor Santos Costa
2011-02-04 01:23:01 +00:00
parent 7fd6faea64
commit 9bdc7ca96e
4 changed files with 6 additions and 8 deletions

View File

@@ -1258,6 +1258,8 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
case _switch_on_cons:
case _if_cons:
case _go_on_cons:
/* make sure we don't leave dangling references to memory that is going to be removed */
ipc->u.sssl.l = NULL;
ipc = NEXTOP(ipc,sssl);
break;
case _op_fail:
@@ -1272,12 +1274,6 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
}
}
void
Yap_cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *sc)
{
cleanup_dangling_indices(ipc, beg, end, sc);
}
static void
decrease_log_indices(LogUpdIndex *c, yamop *suspend_code)
{