[evolution] Bug 623947 - Error handling issues in em-format.c
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 623947 - Error handling issues in em-format.c
- Date: Sat, 10 Jul 2010 13:14:37 +0000 (UTC)
commit 523d1da0198170a476cf965ba6f9075bf67608cb
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Jul 10 09:14:01 2010 -0400
Bug 623947 - Error handling issues in em-format.c
em-format/em-format.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 64918df..af49e10 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]