talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 15814dd06ce1461b1b52efc33ae6b0b7da7dd036
parent ced627e7504468adcde5011f1280aaea626fe79c
Author: wwp <subscript@free.fr>
Date:   Tue, 28 Sep 2021 17:07:13 +0200

Fix CID 1491150: resource leaks.

Diffstat:
Msrc/plugins/pgpcore/passphrase.c | 21++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/plugins/pgpcore/passphrase.c b/src/plugins/pgpcore/passphrase.c @@ -256,23 +256,18 @@ create_description(const gchar *uid_hint, gint prev_bad, gint new_key) *(strchr(my_uid, '>')) = ')'; if (new_key == 1) { - buf = g_strdup_printf (g_strconcat("<span weight=\"bold\" size=\"larger\">%s", - _("Please enter the passphrase for the new key:"), - "</span>\n\n%.*s\n", NULL), - prev_bad ? - _("Passphrases did not match.\n") : "", + buf = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s%s</span>\n\n%.*s\n", + prev_bad ? _("Passphrases did not match.\n") : "", + _("Please enter the passphrase for the new key:"), linelen (my_uid), my_uid); } else if (new_key == 2) { - buf = g_strdup_printf (g_strconcat("<span weight=\"bold\" size=\"larger\">", - _("Please re-enter the passphrase for the new key:"), - "</span>\n\n%.*s\n", NULL), + buf = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%.*s\n", + _("Please re-enter the passphrase for the new key:"), linelen (my_uid), my_uid); } else { - buf = g_strdup_printf (g_strconcat("<span weight=\"bold\" size=\"larger\">%s", - _("Please enter the passphrase for:"), - "</span>\n\n%.*s\n", NULL), - prev_bad ? - _("Bad passphrase.\n") : "", + buf = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s%s</span>\n\n%.*s\n", + prev_bad ? _("Bad passphrase.\n") : "", + _("Please enter the passphrase for:"), linelen (my_uid), my_uid); } g_free(my_uid);