[Decode] Correct ddi heap element count when free

All ddi heap are linked list instead of array. So it needs to iterate all elements to avoid potential leak.
2 files changed