Trim null bytes from kernel version

pull/748/head
Aman Gupta 6 years ago committed by GitHub
parent 8a5bcfdb53
commit 62a406ec1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -380,7 +380,7 @@ func KernelVersionWithContext(ctx context.Context) (version string, err error) {
if err != nil { if err != nil {
return "", err return "", err
} }
return string(utsname.Release[:]), nil return string(utsname.Release[:bytes.IndexByte(utsname.Release[:], 0)]), nil
} }
func getSlackwareVersion(contents []string) string { func getSlackwareVersion(contents []string) string {

Loading…
Cancel
Save