[tracker] Make sure we call va_end before returning in evolution-imap module



commit 96beded93116ac5dd0672fee5aa97c9b988395b3
Author: Martyn Russell <martyn imendio com>
Date:   Wed May 13 15:58:26 2009 +0100

    Make sure we call va_end before returning in evolution-imap module
---
 src/tracker-indexer/modules/evolution-imap.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/tracker-indexer/modules/evolution-imap.c b/src/tracker-indexer/modules/evolution-imap.c
index 7d3eb56..59f07e1 100644
--- a/src/tracker-indexer/modules/evolution-imap.c
+++ b/src/tracker-indexer/modules/evolution-imap.c
@@ -167,6 +167,7 @@ read_summary (FILE *summary,
                         }
 
                         if (c == EOF) {
+				va_end (args);
                                 return FALSE;
                         }
 
@@ -176,6 +177,7 @@ read_summary (FILE *summary,
 			gint32 value, *dest;
 
 			if (fread (&value, sizeof (gint32), 1, summary) != 1) {
+				va_end (args);
 				return FALSE;
 			}
 
@@ -196,6 +198,7 @@ read_summary (FILE *summary,
 			}
 
 			if (c == EOF) {
+				va_end (args);
 				return FALSE;
 			} else {
 				value |= (c & 0x7f);
@@ -235,11 +238,13 @@ read_summary (FILE *summary,
 
 			str = g_try_malloc0 (len);
 			if (!str) {
+				va_end (args);
 				return FALSE;
 			}
 
 			if (fread (str, len - 1, 1, summary) != 1) {
 				g_free (str);
+				va_end (args);
 				return FALSE;
 			}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]