mirror of
https://github.com/containers/podman.git
synced 2025-10-20 20:54:45 +08:00
Fix file descriptor leaks and add test
* Add response.Body.Close() where needed to release HTTP connections to API server. * Add tests to ensure no general leaks occur. 100% coverage would be required to ensure no leaks on any call. * Update code comments to be godoc correct Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
@ -28,5 +28,7 @@ func Commit(ctx context.Context, nameOrID string, options *CommitOptions) (handl
|
||||
if err != nil {
|
||||
return id, err
|
||||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
return id, response.Process(&id)
|
||||
}
|
||||
|
Reference in New Issue
Block a user