talons

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

commit f930692abee77f95f533f41959bbbfbf1129a78c
parent 045269e915ee5d0c7345c9f08ecb347037b2efee
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 @@ -257,23 +257,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);