summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan/mime/mailmime_decode.c
Unidiff
Diffstat (limited to 'kmicromail/libetpan/mime/mailmime_decode.c') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libetpan/mime/mailmime_decode.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/kmicromail/libetpan/mime/mailmime_decode.c b/kmicromail/libetpan/mime/mailmime_decode.c
index 3025dcb..e48ec19 100644
--- a/kmicromail/libetpan/mime/mailmime_decode.c
+++ b/kmicromail/libetpan/mime/mailmime_decode.c
@@ -189,12 +189,22 @@ int mailmime_encoded_phrase_parse(const char * default_fromcode,
189 189
190 if (wordutf8 != NULL) { 190 switch (r) {
191 if (mmap_string_append(gphrase, wordutf8) == NULL) { 191 case MAIL_CHARCONV_ERROR_MEMORY:
192 free(wordutf8); 192 free(raw_word);
193 free(raw_word); 193 res = MAILIMF_ERROR_MEMORY;
194 res = MAILIMF_ERROR_MEMORY; 194 goto free;
195 goto free;
196 }
197 195
196 case MAIL_CHARCONV_ERROR_UNKNOWN_CHARSET:
197 case MAIL_CHARCONV_ERROR_CONV:
198 free(raw_word);
199 res = MAILIMF_ERROR_PARSE;
200 goto free;
201 }
202
203 if (mmap_string_append(gphrase, wordutf8) == NULL) {
198 free(wordutf8); 204 free(wordutf8);
205 free(raw_word);
206 res = MAILIMF_ERROR_MEMORY;
207 goto free;
199 } 208 }
209
200 free(raw_word); 210 free(raw_word);