* add DAV namespace
authorWilfried Göesgens <willi@citadel.org>
Sun, 11 Oct 2009 14:37:05 +0000 (14:37 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 11 Oct 2009 14:37:05 +0000 (14:37 +0000)
* fix leak in template reader while logging errors

webcit/subst.c
webcit/subst.h

index 8bf67c1c8dff0c32b75843296cbe55306552d9c9..eea66ae6b98c06dcc30d58edea1a1b8dcb8c4060 100644 (file)
@@ -104,6 +104,7 @@ const char *CtxNames[]  = {
        "Context FLOORS",
        "Context ITERATE",
        "Context ICAL",
+       "Context DavNamespace",
        "Context UNKNOWN"
 };
 
@@ -178,8 +179,11 @@ void LogTemplateError (StrBuf *Target, const char *Type, int ErrorPos, WCTemplpu
                return;
 */
        WCC = WC;
-       if (WCC == NULL)
-               return;
+       if (WCC == NULL) {
+               FreeStrBuf(&Info);
+               FreeStrBuf(&Error);
+               return; 
+       }
 
        Header = NewStrBuf();
        if (TP->Tokens != NULL) 
index a8741ad2a0b6d6a8611816f894f272baa8807af7..36c68a2d2c47c4f4521a3e5a99cdc06b090377ce 100644 (file)
@@ -51,8 +51,9 @@ enum {
 #define CTX_FLOORS 15
 #define CTX_ITERATE 16
 #define CTX_ICAL 17
+#define CTX_DAVNS 18
 
-#define CTX_UNKNOWN 18
+#define CTX_UNKNOWN 19
 
 
 /**