1
0
mirror of https://github.com/docker/cli.git synced 2026-01-26 15:41:42 +03:00

function setupOOMScoreAdj file close illogicality

Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
Upstream-commit: e82fa89bcd7118af9b1a7ef2f15748a9e879813d
Component: engine
This commit is contained in:
chchliang
2016-11-18 15:56:52 +08:00
parent 57cb96469f
commit 42dbfa07b6

View File

@@ -1230,7 +1230,7 @@ func setupOOMScoreAdj(score int) error {
if err != nil {
return err
}
defer f.Close()
stringScore := strconv.Itoa(score)
_, err = f.WriteString(stringScore)
if os.IsPermission(err) {
@@ -1242,7 +1242,7 @@ func setupOOMScoreAdj(score int) error {
}
return nil
}
f.Close()
return err
}