aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-10 21:14:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-10 21:14:01 +0800
commit523d1da0198170a476cf965ba6f9075bf67608cb (patch)
tree3687adf3a9a19758bc17ce6b72c1ae6861bb6d2e /em-format
parent8734644b43e1e1854ee1f004f42e220d8a2fb0b8 (diff)
downloadgsoc2013-evolution-523d1da0198170a476cf965ba6f9075bf67608cb.tar
gsoc2013-evolution-523d1da0198170a476cf965ba6f9075bf67608cb.tar.gz
gsoc2013-evolution-523d1da0198170a476cf965ba6f9075bf67608cb.tar.bz2
gsoc2013-evolution-523d1da0198170a476cf965ba6f9075bf67608cb.tar.lz
gsoc2013-evolution-523d1da0198170a476cf965ba6f9075bf67608cb.tar.xz
gsoc2013-evolution-523d1da0198170a476cf965ba6f9075bf67608cb.tar.zst
gsoc2013-evolution-523d1da0198170a476cf965ba6f9075bf67608cb.zip
Bug 623947 - Error handling issues in em-format.c
Diffstat (limited to 'em-format')
-rw-r--r--em-format/em-format.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 64918df656..af49e1062d 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -1365,6 +1365,8 @@ emf_application_xpkcs7mime (EMFormat *emf,
emf, stream, "%s",
local_error->message ? local_error->message :
_("Could not parse S/MIME message: Unknown error"));
+ g_clear_error (&local_error);
+
em_format_part_as(emf, stream, part, NULL);
} else {
if (emfc == NULL)
@@ -1543,6 +1545,8 @@ emf_multipart_encrypted (EMFormat *emf,
if (local_error->message != NULL)
em_format_format_error (
emf, stream, "%s", local_error->message);
+ g_clear_error (&local_error);
+
em_format_part_as(emf, stream, part, "multipart/mixed");
} else {
if (emfc == NULL)
@@ -1727,7 +1731,10 @@ emf_multipart_signed (EMFormat *emf,
_("Unknown error verifying signature"));
if (local_error->message != NULL)
em_format_format_error (
- emf, stream, "%s", local_error->message);
+ emf, stream, "%s",
+ local_error->message);
+ g_clear_error (&local_error);
+
em_format_part_as(emf, stream, part, "multipart/mixed");
} else {
if (emfc == NULL)
@@ -1740,7 +1747,6 @@ emf_multipart_signed (EMFormat *emf,
em_format_format_secure(emf, stream, cpart, valid);
}
- g_error_free (local_error);
g_object_unref (cipher);
}
}
@@ -1884,7 +1890,7 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E
emf, stream, "%s", local_error->message);
em_format_format_source(emf, stream, ipart);
/* I think this will loop: em_format_part_as(emf, stream, part, "text/plain"); */
- g_error_free (local_error);
+ g_clear_error (&local_error);
g_object_unref (cipher);
return;
}
@@ -1968,7 +1974,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart
em_format_format_source(emf, stream, ipart);
/* I think this will loop: em_format_part_as(emf, stream, part, "text/plain"); */
- g_error_free (local_error);
+ g_clear_error (&local_error);
g_object_unref (cipher);
g_object_unref (opart);
return;