Browse Source

Call to malloc may return NULL in SpectCreateFrame(spect.c) [msvc /analyze]

master
Reece H. Dunn 9 years ago
parent
commit
d8a88fc8e7
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/libespeak-ng/spect.c

+ 5
- 0
src/libespeak-ng/spect.c View File

SpectFrame *frame; SpectFrame *frame;


frame = malloc(sizeof(SpectFrame)); frame = malloc(sizeof(SpectFrame));
if (!frame)
return NULL;

frame->keyframe = 0; frame->keyframe = 0;
frame->spect = NULL; frame->spect = NULL;
frame->markers = 0; frame->markers = 0;
} }
for (ix = 0; ix < n; ix++) { for (ix = 0; ix < n; ix++) {
SpectFrame *frame = SpectFrameCreate(); SpectFrame *frame = SpectFrameCreate();
if (!frame)
return ENOMEM;


if (LoadFrame(frame, stream, spect->file_format) != 0) { if (LoadFrame(frame, stream, spect->file_format) != 0) {
free(frame); free(frame);

Loading…
Cancel
Save