mirror of https://github.com/thesofproject/sof.git
probes-app: add allocation check
This will check if the allocation succeeded Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
This commit is contained in:
parent
2765b22049
commit
f1fa3be980
|
@ -199,6 +199,12 @@ void parse_data(char *file_in)
|
|||
}
|
||||
|
||||
packet = malloc(PACKET_MAX_SIZE);
|
||||
if (!packet) {
|
||||
fprintf(stderr, "error: allocation failed, err %d\n",
|
||||
errno);
|
||||
fclose(fd_in);
|
||||
exit(0);
|
||||
}
|
||||
memset(&data, 0, sizeof(uint32_t) * DATA_READ_LIMIT);
|
||||
memset(&files, 0, sizeof(struct wave_files) * FILES_LIMIT);
|
||||
|
||||
|
|
Loading…
Reference in New Issue