Commit 49ce0ab
authored
ggml: handle ggml_init failure to fix NULL pointer deref (#8692)
`ggml_init` can fail if no unused context is found. In that case, a NULL-pointer deref will happen later in the code during a call to `ggml_set_on_alloc`.
This fixes it by bailing out if no context is found.1 parent 4226a8d commit 49ce0ab
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21096 | 21096 | | |
21097 | 21097 | | |
21098 | 21098 | | |
| 21099 | + | |
| 21100 | + | |
| 21101 | + | |
| 21102 | + | |
| 21103 | + | |
| 21104 | + | |
21099 | 21105 | | |
21100 | 21106 | | |
21101 | 21107 | | |
| |||
0 commit comments