Allow running 'pkg lock -l' without specifying any packages to lock and hence without needing privileged access to the DB.
Allow running 'pkg lock -l' without specifying any packages to lock
and hence without needing privileged access to the DB.

Free some variables used when listing the locked packages

Some whitespace cleanup

This makes pkg actually behave according to the intent expressed in
issue #635

Open343/pkg,khorben/pkg,en90/pkg,khorben/pkg,junovitch/pkg,skoef/pkg,en90/pkg,skoef/pkg,Open343/pkg,khorben/pkg,junovitch/pkg