summaryrefslogtreecommitdiff
path: root/mount.go
diff options
context:
space:
mode:
Diffstat (limited to 'mount.go')
-rw-r--r--mount.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/mount.go b/mount.go
index 3e93169..0d70201 100644
--- a/mount.go
+++ b/mount.go
@@ -88,7 +88,14 @@ func doMount(args *argContainer) int {
} else {
// Load master key from config file
// Prompts the user for the password
- masterkey, confFile = loadConfig(args)
+ masterkey, confFile, err = loadConfig(args)
+ if err != nil {
+ if args._ctlsockFd != nil {
+ // Close the socket file (which also deletes it)
+ args._ctlsockFd.Close()
+ }
+ os.Exit(ErrExitLoadConf)
+ }
printMasterKey(masterkey)
}
// We cannot use JSON for pretty-printing as the fields are unexported