[balsa/gtk3] Fix mem leak on error
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Fix mem leak on error
- Date: Mon, 16 Jul 2012 01:51:41 +0000 (UTC)
commit e986b77a7f3d384d1219122b5c537999bd2c3706
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jul 15 19:52:33 2012 -0400
Fix mem leak on error
* src/balsa-index.c (bndx_start_pipe_messages_array): fix mem
leak on error.
ChangeLog | 5 +++++
src/balsa-index.c | 8 +++++---
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 087a8e5..0eefaeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-07-15 Albrecht DreÃ
+ * src/balsa-index.c (bndx_start_pipe_messages_array): fix mem
+ leak on error.
+
+2012-07-15 Albrecht DreÃ
+
* libbalsa/mailbox_mbox.c (libbalsa_mailbox_mbox_add_message):
fix mem leak on error.
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 18ed789..e75714e 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -2676,16 +2676,18 @@ bndx_start_pipe_messages_array(LibBalsaMailbox *mailbox,
const char *pipe_cmd)
{
guint i;
- struct BndxPipeQueue *queue = g_new(struct BndxPipeQueue, 1);
- queue->mailbox = mailbox;
+ struct BndxPipeQueue *queue;
+
if(!libbalsa_mailbox_open(mailbox, NULL))
return FALSE;
+
+ queue = g_new(struct BndxPipeQueue, 1);
+ queue->mailbox = mailbox;
queue->msgnos = g_array_sized_new(FALSE, FALSE, sizeof(guint), msgnos->len);
queue->pipe_cmd = g_strdup(pipe_cmd);
for(i=0; i<msgnos->len; i++)
g_array_append_val(queue->msgnos,
g_array_index(msgnos, guint, msgnos->len-i-1));
- ;
libbalsa_mailbox_register_msgnos(mailbox, queue->msgnos);
bndx_pipe_queue_last(queue);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]