From: Wilfried Goesgens Date: Wed, 8 Feb 2012 18:58:22 +0000 (+0100) Subject: Siteconfig: fix memleak in case of error. X-Git-Tag: v8.11~198 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=d2936614cbe498d48aa8fb12542724845ce4cec2 Siteconfig: fix memleak in case of error. --- diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index a2b429806..4038bd03f 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -224,6 +224,7 @@ void load_siteconfig(void) if (GetServerStatus(Buf, NULL) != 1) { StrBufCutLeft(Buf, 4); AppendImportantMessage(SKEY(Buf)); + FreeStrBuf(&Buf); return; } @@ -250,6 +251,7 @@ void load_siteconfig(void) while ((len = StrBuf_ServGetln(Buf), strcmp(ChrPtr(Buf), "000"))) {} AppendImportantMessage(_("WARNING: Failed to parse Server Config; do you run a to new citserver?"), -1); + FreeStrBuf(&Buf); return; } FreeStrBuf(&Buf);