Memory leak / useless variable
You have a variable numbers
that is a long_list
filled with the numbers 1..triangle_number
, but you never use this list. Later, when you free the list, you forgot to also free numbers->values
.
I would suggest writing a free_long_list()
function so that you don't have to remember to free the values
field everywhere you free a long_list
.
JS1
- 28.8k
- 3
- 41
- 83
default