From 9045713bf3089e4b6d2c9719580f011adf4d6f97 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 8 Feb 2012 19:58:22 +0100 Subject: [PATCH] Siteconfig: fix memleak in case of error. --- webcit/siteconfig.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.30.2