]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml: handle ggml_init failure to fix NULL pointer deref (#8692)
authorDavidKorczynski <redacted>
Thu, 25 Jul 2024 21:23:05 +0000 (22:23 +0100)
committerGitHub <redacted>
Thu, 25 Jul 2024 21:23:05 +0000 (23:23 +0200)
commit49ce0ab6d45402e8bb622bf86f86529f2b0ba552
tree5c545e370a7b460da9ecffc6dc2d39d7b9eb1a9d
parent4226a8d10e3904db3a1297919fe6c7f06beba6c0
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.
ggml/src/ggml.c