From a9d72d928679ef5bbf7ebee4a7fb292ea26594f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 11 Oct 2009 14:37:05 +0000 Subject: [PATCH] * add DAV namespace * fix leak in template reader while logging errors --- webcit/subst.c | 8 ++++++-- webcit/subst.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/webcit/subst.c b/webcit/subst.c index 8bf67c1c8..eea66ae6b 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -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) diff --git a/webcit/subst.h b/webcit/subst.h index a8741ad2a..36c68a2d2 100644 --- a/webcit/subst.h +++ b/webcit/subst.h @@ -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 /** -- 2.30.2