diff options
-rw-r--r-- | apps/talk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/talk.c b/apps/talk.c index f9d7100800..8a428d1ed8 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -624,6 +624,9 @@ static bool load_voicefile_data(int fd) | |||
624 | /* the first alloc is the clip metadata table */ | 624 | /* the first alloc is the clip metadata table */ |
625 | metadata_alloc_size = max_clips * sizeof(struct clip_cache_metadata); | 625 | metadata_alloc_size = max_clips * sizeof(struct clip_cache_metadata); |
626 | metadata_table_handle = buflib_alloc(&clip_ctx, metadata_alloc_size); | 626 | metadata_table_handle = buflib_alloc(&clip_ctx, metadata_alloc_size); |
627 | if (metadata_table_handle <= 0) | ||
628 | talk_status = TALK_STATUS_ERR_OOM; | ||
629 | return false; | ||
627 | memset(buflib_get_data(&clip_ctx, metadata_table_handle), 0, metadata_alloc_size); | 630 | memset(buflib_get_data(&clip_ctx, metadata_table_handle), 0, metadata_alloc_size); |
628 | 631 | ||
629 | load_initial_clips(fd); | 632 | load_initial_clips(fd); |
@@ -891,7 +894,7 @@ int talk_id(int32_t id, bool enqueue) | |||
891 | int32_t unit; | 894 | int32_t unit; |
892 | int decimals; | 895 | int decimals; |
893 | struct queue_entry clip; | 896 | struct queue_entry clip; |
894 | bool isloaded = false; | 897 | bool isloaded = true; |
895 | 898 | ||
896 | if (!has_voicefile) | 899 | if (!has_voicefile) |
897 | return 0; /* no voicefile loaded, not an error -> pretent success */ | 900 | return 0; /* no voicefile loaded, not an error -> pretent success */ |