From 9d31bba6bcbfbf7749a8d5f3614dc1433e441e20 Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Mon, 17 Apr 2006 21:08:38 +0000 Subject: [PATCH] fix some v-card error handling, sr=mscott 334384 --- mailnews/addrbook/src/nsVCard.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mailnews/addrbook/src/nsVCard.cpp b/mailnews/addrbook/src/nsVCard.cpp index 7616621a4dfd..3f20720b92d6 100644 --- a/mailnews/addrbook/src/nsVCard.cpp +++ b/mailnews/addrbook/src/nsVCard.cpp @@ -940,8 +940,10 @@ static char * lexGetDataFromBase64() } else if ((c == ' ') || (c == '\t')) { continue; } else { /* error condition */ - PR_FREEIF (bytes); - PR_FREEIF(oldBytes); + if (bytes) + PR_Free (bytes); + else if (oldBytes) + PR_Free (oldBytes); /* error recovery: skip until 2 adjacent newlines. */ DBG_(("db: invalid character 0x%x '%c'\n", c,c)); if (c != EOF) {