]> code.citadel.org Git - citadel.git/blobdiff - webcit/html2html.c
* null that strbuf on definition
[citadel.git] / webcit / html2html.c
index 12cd1b198007d9d90a518cf6047dc3cc59d6fd1a..ee9f705d55515e2d144e3dfa71989541f33fc241 100644 (file)
@@ -100,7 +100,7 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St
        int i;
        int linklen;
        char charset[128];
-       StrBuf *BodyArea;
+       StrBuf *BodyArea = NULL;
 #ifdef HAVE_ICONV
        iconv_t ic = (iconv_t)(-1) ;
        char *ibuf;                   /**< Buffer of characters to be converted */
@@ -514,8 +514,10 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St
                }
                if (!strncasecmp(ptr, "</A>", 3)) --alevel;
        }
-       if (BodyArea != NULL) 
+       if (BodyArea != NULL) {
                StrBufAppendBufPlain(converted_msg, HKEY("</td></tr></table>"), 0);  
+               FreeStrBuf(&BodyArea);
+       }
 
        /**     uncomment these two lines to override conversion        */
        /**     memcpy(converted_msg, msg, content_length);             */