diff --git a/src/phosh.c b/src/phosh.c
index bbd9653ba216b414233a7efed5495a945d09e560..7f5115c312cafc7074b77f4f966a333ae9e53bcf 100644
--- a/src/phosh.c
+++ b/src/phosh.c
@@ -950,7 +950,7 @@ int main(int argc, char *argv[])
   GMainContext *context;
   GOptionContext *opt_context;
   GError *err = NULL;
-  gboolean unlocked;
+  gboolean unlocked = FALSE;
 
   const GOptionEntry options [] = {
     {"unlocked", 'U', 0, G_OPTION_ARG_NONE, &unlocked,