Add missing free calls for program buffer