Closed harenome closed 8 years ago
Looks good to me.
It is not obvious why it is not the case for clastloops
(conditions clastloops == NULL
and nclastloops == 0
seem to be either both true or both false), but it does not seem to ever cause a leak.
In the previous implementation,
claststmts
would be freed at each end of the iteration of a while loop. However, ifnclastloops == 0
, the loop would continue to its next iteration without freeingclaststmts
.The current implementation frees
claststmts
as soon as it is useless, ensuring it is always freed.