summaryrefslogtreecommitdiff
path: root/pith/mailview.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2017-12-24 21:54:31 -0700
committerEduardo Chappa <chappa@washington.edu>2017-12-24 21:54:31 -0700
commit965befd7936f8a788b950d650b76f34f606fc1e1 (patch)
tree30b67a65af9555c00e586842b1ed4e9c8e5a0579 /pith/mailview.c
parent5cb80f3539fd43b785638b676c7ba242bda2f75d (diff)
downloadalpine-965befd7936f8a788b950d650b76f34f606fc1e1.tar.xz
* A few fixes to ical.c and mailview.c to avoid memory leaks, and
add support for encodings other than quoted-printable and base64.
Diffstat (limited to 'pith/mailview.c')
-rw-r--r--pith/mailview.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/pith/mailview.c b/pith/mailview.c
index 984b560f..1d92bd91 100644
--- a/pith/mailview.c
+++ b/pith/mailview.c
@@ -515,10 +515,15 @@ format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int w
continue;
}
break;
+
+ default: caltext = cpystr(rawtext);
+ }
+ if(caltext != NULL){
+ vcal = ical_parse_text(caltext);
+ if(vcal != NULL) vcal->encoding = b->encoding;
+ b->sparep = create_body_sparep(iCalType, (void *) vcal);
+ fs_give((void **) &caltext);
}
- vcal = ical_parse_text(caltext);
- if(vcal != NULL) vcal->encoding = b->encoding;
- b->sparep = create_body_sparep(iCalType, (void *) vcal);
}
else if(get_body_sparep_type(b->sparep) == iCalType)
vcal = (VCALENDAR_S *) get_body_sparep_data(b->sparep);