mirror of
https://github.com/clearlinux/rkt.git
synced 2026-11-26 14:10:24 +00:00
Merge pull request #311 from gprggr/proc
pkg/proc: moving defer after error check
This commit is contained in:
+1
-1
@@ -128,10 +128,10 @@ func LiveProcs(prefix string) (map[int][]string, error) {
|
||||
// sockets open on the system accessing any paths with the given prefix
|
||||
func unixSocketsWithPrefix(pre string) (map[string]string, error) {
|
||||
fh, err := os.Open(unixSocks)
|
||||
defer fh.Close()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer fh.Close()
|
||||
socks := make(map[string]string)
|
||||
scanner := bufio.NewScanner(fh)
|
||||
for scanner.Scan() {
|
||||
|
||||
Reference in New Issue
Block a user