silc-client: handle key load error correctly
authorPekka Riikonen <priikone@silcnet.org>
Thu, 29 May 2014 06:53:29 +0000 (09:53 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 29 May 2014 06:53:29 +0000 (09:53 +0300)
apps/irssi/src/silc/core/clientutil.c

index 0daceefff530e2952e227223e0271abc90067985..56854526514bc5988148243e6b9c869dbe04d026 100644 (file)
@@ -363,9 +363,10 @@ int silc_client_load_keys(SilcClient client)
   ret = silc_load_key_pair(pub, prv, "", &irssi_pubkey, &irssi_privkey);
   if (!ret)
     ret = silc_load_key_pair(pub, prv, NULL, &irssi_pubkey, &irssi_privkey);
-
-  if (!ret)
+  if (!ret) {
     SILC_LOG_ERROR(("Could not load key pair"));
+    return ret;
+  }
 
   if (silc_pkcs_private_key_get_len(irssi_privkey) < 4096) {
     fprintf(stdout,