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



commit da062d96f6d2c2a7d12a786231351689e11f52ef
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 ae1b224..b33240d 100644
--- a/src/tracker-indexer/modules/evolution-imap.c
+++ b/src/tracker-indexer/modules/evolution-imap.c
@@ -169,6 +169,7 @@ read_summary (FILE *summary,
                         }
 
                         if (c == EOF) {
+				va_end (args);
                                 return FALSE;
                         }
 
@@ -178,6 +179,7 @@ read_summary (FILE *summary,
 			gint32 value, *dest;
 
 			if (fread (&value, sizeof (gint32), 1, summary) != 1) {
+				va_end (args);
 				return FALSE;
 			}
 
@@ -198,6 +200,7 @@ read_summary (FILE *summary,
 			}
 
 			if (c == EOF) {
+				va_end (args);
 				return FALSE;
 			} else {
 				value |= (c & 0x7f);
@@ -237,11 +240,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]