Commit dce5c56
committed
libpod: fix nil pointer dereference in getHostsEntries
When NetMode.IsPasta() is true but pastaResult is nil (which can happen
during container setup failures or in certain edge cases), accessing
c.pastaResult.IPAddresses causes a panic.
Add a nil check for c.pastaResult before accessing its fields, matching
the pattern used elsewhere in the codebase.
Fixes rootless test failures in PR containers#27338.
Signed-off-by: Lokesh Mandvekar <[email protected]>1 parent 3f303c4 commit dce5c56
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2381 | 2381 | | |
2382 | 2382 | | |
2383 | 2383 | | |
2384 | | - | |
| 2384 | + | |
2385 | 2385 | | |
2386 | 2386 | | |
2387 | 2387 | | |
| |||
0 commit comments