[balsa] Do not dereference NULL GError pointer
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Do not dereference NULL GError pointer
- Date: Wed, 3 May 2017 01:00:34 +0000 (UTC)
commit 0c025796b92708a3c4a51c3994da530380eba4ef
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue May 2 20:59:40 2017 -0400
Do not dereference NULL GError pointer
* libbalsa/mailbox_pop3.c (libbalsa_mailbox_pop3_check): check
for err == NULL.
ChangeLog | 7 +++++++
libbalsa/mailbox_pop3.c | 6 ++++--
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9e34384..052260f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-05-02 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Do not dereference NULL GError pointer
+
+ * libbalsa/mailbox_pop3.c (libbalsa_mailbox_pop3_check): check
+ for err == NULL.
+
2017-05-01 Peter Bloomfield <pbloomfield bellsouth net>
Assistant improvements
diff --git a/libbalsa/mailbox_pop3.c b/libbalsa/mailbox_pop3.c
index 5e79319..2ef2225 100644
--- a/libbalsa/mailbox_pop3.c
+++ b/libbalsa/mailbox_pop3.c
@@ -683,8 +683,10 @@ libbalsa_mailbox_pop3_check(LibBalsaMailbox * mailbox)
}
if (!result) {
- libbalsa_information(LIBBALSA_INFORMATION_ERROR, _("POP3 error: %s"), err->message);
- g_error_free(err);
+ libbalsa_information(LIBBALSA_INFORMATION_ERROR, _("POP3 error: %s"),
+ err != NULL ? err->message : "?");
+ if (err != NULL)
+ g_error_free(err);
}
/* done - clean up */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]