Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
9714e38d
Unverified
Commit
9714e38d
authored
Sep 08, 2025
by
Michael Yang
Committed by
GitHub
Sep 08, 2025
Browse files
fix: nil pointer dereference if cache is nil (#12215)
parent
4378ae4f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
runner/ollamarunner/cache.go
runner/ollamarunner/cache.go
+2
-4
No files found.
runner/ollamarunner/cache.go
View file @
9714e38d
...
...
@@ -70,11 +70,9 @@ func kvCacheTypeFromStr(s string) ml.DType {
}
func
(
c
*
InputCache
)
Close
()
{
if
c
==
nil
{
return
}
if
c
!=
nil
&&
c
.
cache
!=
nil
{
c
.
cache
.
Close
()
}
}
// Locking: Operations on InputCacheSlot (including finding one
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment