Skip to content

Commit d14d5ed

Browse files
author
Anoop Kapoor
committed
Addressed Ashish's comment
1 parent fd0e6cf commit d14d5ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml/src/ggml-tsavorite/ggml-tsavorite.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,10 @@ static MemRefDescriptor<Rank>* create_mlir_buf(int K) {
776776
MemRefDescriptor<Rank>* header = (MemRefDescriptor<Rank>*) tsi_alloc(
777777
sizeof(MemRefDescriptor<Rank>) + num_of_elem * sizeof(float)
778778
);
779+
780+
if (!header) {
781+
return header;
782+
}
779783
// Advance pointer to skip header and get to data
780784
int32_t* data = (int32_t*)(header + 1);
781785

0 commit comments

Comments
 (0)