From 2c08a863b7242f6658151a2e2592a6293c4dcb65 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 19 May 2018 00:18:27 -0600 Subject: * Clear history when closing alpine, for commands that keep it. * Reversing the clearing of the rmap memory. --- pith/filter.c | 10 ++-------- pith/filter.h | 2 +- pith/reply.c | 3 +++ pith/send.c | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) (limited to 'pith') diff --git a/pith/filter.c b/pith/filter.c index e4dbda07..9f0182ba 100644 --- a/pith/filter.c +++ b/pith/filter.c @@ -1799,7 +1799,6 @@ gf_convert_8bit_charset(FILTER_S *f, int flg) typedef struct _utf8c_s { void *conv_table; int report_err; - int free_this; } UTF8C_S; @@ -1914,12 +1913,8 @@ gf_convert_utf8_charset(FILTER_S *f, int flg) } else if(flg == GF_EOD){ (void) GF_FLUSH(f->next); - if(f->opt){ - if(((UTF8C_S *) f->opt)->conv_table != NULL - && ((UTF8C_S *) f->opt)->free_this != 0) - fs_give((void **) &((UTF8C_S *) f->opt)->conv_table); + if(f->opt) fs_give((void **) &f->opt); - } (*f->next->f)(f->next, GF_EOD); } else if(flg == GF_RESET){ @@ -1933,14 +1928,13 @@ gf_convert_utf8_charset(FILTER_S *f, int flg) void * -gf_convert_utf8_charset_opt(void *table, int report_err, int free_this) +gf_convert_utf8_charset_opt(void *table, int report_err) { UTF8C_S *utf8c; utf8c = (UTF8C_S *) fs_get(sizeof(UTF8C_S)); utf8c->conv_table = table; utf8c->report_err = report_err; - utf8c->free_this = free_this; return((void *) utf8c); } diff --git a/pith/filter.h b/pith/filter.h index fdcaad73..89e085fe 100644 --- a/pith/filter.h +++ b/pith/filter.h @@ -183,7 +183,7 @@ void gf_qp_8bit(FILTER_S *, int); void gf_8bit_qp(FILTER_S *, int); void gf_convert_8bit_charset(FILTER_S *, int); void gf_convert_utf8_charset(FILTER_S *, int); -void *gf_convert_utf8_charset_opt(void *, int, int); +void *gf_convert_utf8_charset_opt(void *, int); void gf_2022_jp_to_euc(FILTER_S *, int); void gf_native8bitjapanese_to_2022_jp(FILTER_S *, int); void gf_euc_to_2022_jp(FILTER_S *, int); diff --git a/pith/reply.c b/pith/reply.c index 7bda78cb..398ee63d 100644 --- a/pith/reply.c +++ b/pith/reply.c @@ -2702,6 +2702,9 @@ get_body_part_text(MAILSTREAM *stream, struct mail_bodystruct *body, *ret_charset = "UTF-8"; } + if(charset) + fs_give((void **) &charset); + /* * just use detach, but add an auxiliary filter to insert prefix, * and, perhaps, digest richtext diff --git a/pith/send.c b/pith/send.c index ff48de2d..460f6a24 100644 --- a/pith/send.c +++ b/pith/send.c @@ -4369,7 +4369,7 @@ pine_rfc822_output_body(struct mail_bodystruct *body, soutr_t f, void *s) if(table){ gf_link_filter(gf_convert_utf8_charset, - gf_convert_utf8_charset_opt(table,0,1)); + gf_convert_utf8_charset_opt(table,0)); } else{ /* else, just send it? */ -- cgit v1.2.3-54-g00ecf