Commit 4b231e6
committed
fix: handle nil Health state in docker container handler
Container.State.Health can be nil when no health check is configured.
Check for nil before accessing .Status to prevent panic.
Fixes nil pointer dereference in newDockerContainerHandler when
inspecting containers without health checks.
Signed-off-by: Davanum Srinivas <[email protected]>1 parent 67e640d commit 4b231e6
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
0 commit comments