Client: Fix signature verification double free
[silc.git] / apps / irssi / src / silc / core / client_ops.c
index cfefe3275300b7e98db354c1ec378c3128b751b9..a4d53b76504b981fcbf7a0a197225d8d4e2f0c2a 100644 (file)
@@ -262,10 +262,11 @@ int verify_message_signature(SilcClientEntry sender,
                                      sizeof(sender->fingerprint));
       if (strcmp(fingerprint, fingerprint2)) {
         /* since the public key differs from the senders public key, the
-           verification _failed_ */
+           verification won't be done */
         silc_pkcs_public_key_free(pk);
         silc_free(fingerprint);
-        ret = SILC_MSG_SIGNED_UNKNOWN;
+        silc_free(fingerprint2);
+       return SILC_MSG_SIGNED_UNKNOWN;
       }
       silc_free(fingerprint2);
     }