* fix leak in message citing
authorWilfried Göesgens <willi@citadel.org>
Fri, 12 Sep 2008 10:25:45 +0000 (10:25 +0000)
committerWilfried Göesgens <willi@citadel.org>
Fri, 12 Sep 2008 10:25:45 +0000 (10:25 +0000)
webcit/webcit.c

index 1704cfb934196fe7c34ac19eade15a14bfa44328..bcdb8e9477c0c4f3582b4caf07c3ef01f57b14ed 100644 (file)
@@ -614,10 +614,11 @@ void jsescputs(char *strbuf)
  */
 void msgescputs1( char *strbuf)
 {
-       StrBuf *OutBuf = NewStrBuf();
+       StrBuf *OutBuf;
 
        if ((strbuf == NULL) || IsEmptyStr(strbuf))
                return;
+       OutBuf = NewStrBuf();
        StrMsgEscAppend(OutBuf, NULL, strbuf);
        StrEscAppend(WC->WBuf, OutBuf, NULL, 0, 0);
        FreeStrBuf(&OutBuf);