Skip to content

Commit

Permalink
close file handles after usage
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Aug 9, 2012
1 parent e4c85f0 commit 9126aaa
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ sub _getLoggedUsers {
next unless $line =~ /^(\S+)/;
push @users, { LOGIN => $1 };
}
close $handle;

return @users;
}
Expand All @@ -76,6 +77,7 @@ sub _getLocalUsers {
next if $login eq 'nobody';
push @users, { LOGIN => $login };
}
close $handle;

return @users;
}
Expand Down

0 comments on commit 9126aaa

Please sign in to comment.