| } | } | ||||
| for (ix = 0; ix < n; ix++) { | for (ix = 0; ix < n; ix++) { | ||||
| SpectFrame *frame = SpectFrameCreate(); | SpectFrame *frame = SpectFrameCreate(); | ||||
| if (!frame) | |||||
| if (!frame) { | |||||
| fclose(stream); | |||||
| return ENOMEM; | return ENOMEM; | ||||
| } | |||||
| espeak_ng_STATUS status = LoadFrame(frame, stream, spect->file_format); | espeak_ng_STATUS status = LoadFrame(frame, stream, spect->file_format); | ||||
| if (status != ENS_OK) { | if (status != ENS_OK) { | ||||
| free(frame); | free(frame); | ||||
| fclose(stream); | |||||
| return status; | return status; | ||||
| } | } | ||||