BMesh Operators: BMO_op_finish now overwrites values in debug mode

This should prevent accidental use-after-free.
This commit is contained in:
Campbell Barton 2013-11-27 13:42:24 +11:00
parent 4dd949632a
commit 45eed8246a
1 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,9 @@ void BMO_op_finish(BMesh *bm, BMOperator *op)
#ifdef DEBUG
BM_ELEM_INDEX_VALIDATE(bm, "post bmo", bmo_opdefines[op->type]->opname);
/* avoid accidental re-use */
memset(op, 0xff, sizeof(*op));
#else
(void)bm;
#endif