| ... | ... |
@@ -1,6 +1,7 @@ |
| 1 | 1 |
package docker |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 |
+ "bytes" |
|
| 4 | 5 |
"strconv" |
| 5 | 6 |
"strings" |
| 6 | 7 |
"syscall" |
| ... | ... |
@@ -26,6 +27,9 @@ func getKernelVersion() (*KernelVersionInfo, error) {
|
| 26 | 26 |
i++ |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
+ // Remove the \x00 from the release for Atoi to parse correctly |
|
| 30 |
+ release = release[:bytes.IndexByte(release, 0)] |
|
| 31 |
+ |
|
| 29 | 32 |
tmp := strings.SplitN(string(release), "-", 2) |
| 30 | 33 |
tmp2 := strings.SplitN(tmp[0], ".", 3) |
| 31 | 34 |
|