Close fd in case fd.Write() returns error
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
This commit is contained in:
parent
dd8d48ede8
commit
db29dce076
|
@ -886,10 +886,10 @@ func waitForCriuLazyServer(r *os.File, status string) error {
|
|||
return err
|
||||
}
|
||||
_, err = fd.Write(data)
|
||||
fd.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fd.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue