Seems to me that a memory leak has been introduced here. If add_attachment() is called, then g_free(val) is not but "val = decode_and_strdup(ptr,'&', &ptr);" is called every time.
Steve -----Original Message----- From: Johan Brannlund To: [email protected] Sent: 10/31/2006 11:06 PM Subject: [PATCH] Attachments in mailto: URLs I noticed when trying to mail pictures from f-spot that Balsa didn't include the attachments. A bit of digging revealed that the reason is that Balsa doesn't understand things like "mailto:[EMAIL PROTECTED]/tmp/strudel.jpg" I hacked up a small patch for this, included below. In case it suffers from whitespace damage, it's also available at http://nullinfinity.org/attach.patch . Regards, Johan --- origbalsa/src/sendmsg-window.c 2006-10-08 08:52:03.000000000 -0700 +++ balsa/src/sendmsg-window.c 2006-10-31 19:59:41.000000000 -0800 @@ -4596,8 +4596,12 @@ key = decode_and_strdup(ptr,'=', &ptr); if(ptr) { val = decode_and_strdup(ptr,'&', &ptr); - func(data, key, val); - g_free(val); + if (g_ascii_strcasecmp(key, "attach") == 0) + add_attachment(data,val,FALSE,NULL); + else { + func(data, key, val); + g_free(val); + } } g_free(key); } _______________________________________________ balsa-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/balsa-list _______________________________________________ balsa-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/balsa-list
