[balsa/wip/gmime3: 16/197] Check for NULL pointer
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gmime3: 16/197] Check for NULL pointer
- Date: Wed, 23 May 2018 21:13:42 +0000 (UTC)
commit e1a0057978582a48cf8cd482f474d5f7c0804263
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Jun 28 16:25:12 2017 -0400
Check for NULL pointer
* libbalsa/mailbox.c (lbm_sort): check for NULL prev.
ChangeLog | 6 ++++++
libbalsa/mailbox.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2b71465..d6649f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2017-06-28 Peter Bloomfield <pbloomfield bellsouth net>
+ Check for NULL pointer
+
+ * libbalsa/mailbox.c (lbm_sort): check for NULL prev.
+
+2017-06-28 Peter Bloomfield <pbloomfield bellsouth net>
+
Handle broken pipe and other errors before writing to pipe
* src/balsa-index.c (pipe_in_watch): handle G_IO_HUP or G_IO_ERR
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index 0e659c2..38d3a51 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -3508,7 +3508,8 @@ lbm_sort(LibBalsaMailbox * mbox, GNode * parent)
g_assert(prev == NULL || prev->next == tmp_node);
prev = tmp_node;
}
- prev->next = NULL;
+ if (prev != NULL)
+ prev->next = NULL;
/* Let the world know about our new order */
new_order = g_new(gint, node_array->len);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]