Commit 112ef16
committed
samples: detect_test: add NULL check for comp_data_blob_handler_new()
comp_data_blob_handler_new() can return NULL on allocation failure.
test_keyword_new() passed the result directly to comp_init_data_blob()
without checking, leading to a NULL pointer dereference. Add the
missing check and route to the existing cd_fail cleanup path,
matching the pattern used by dcblock, google_hotword_detect, and
other blob-using components.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>1 parent 3c391c6 commit 112ef16
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
693 | 697 | | |
694 | 698 | | |
695 | 699 | | |
| |||
0 commit comments