This can be caused by motor switches that are gummed up and not cancelling the credit after a vend. It might also be due to a bad credit relay but those relays don't fail very often. If you can narrow the "free vending" down to specific columns then those will be the switches to replace. What happens is that once a vend is finished on an affected column, the bad motor switch doesn't cancel the credit. If that same button is pressed again, another soda will vend and the switch will likely not cancel the credit again. This give the potential for that column to be vended over and over or until the switch finally cancels the credit. If during this condition, any other selection is made and that motor switch works properly, then the credit is cancelled.
If the problem exists at some time on every column of the machine then you can look at the relay as the cause, but I'm betting the issue is isolated to one or two columns, especially the end columns where soda can spray from broken cans onto the switches. It takes a long time for the syrup to thicken and cause trouble so this problem won't be from any recent broken cans.
You can try to isolate this yourself by purchasing every selection once and checking after the vend to see if another press of the button give another soda. You might want to repeat this on each column a few times in case that column's switch is intermittently bad. Once you are satisfied with a column's operation then move to the next column and repeat this process. It will take some time but you will hopefully be able to identify the column or columns that this happens to and then you can leave them out of service while you get new switches for them.
I have the switches you would need so you can PM me if you need them.