tMemory leak in SendHighScores() fixed. - vaccinewars - be a doctor and try to … | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 693a111612284494085ee70284eb8cc05155e689 | |
parent 88bf62955e594a05fdb1d61dc6a23f3a727762d9 | |
Author: Ben Webb <[email protected]> | |
Date: Fri, 2 Aug 2002 16:15:41 +0000 | |
Memory leak in SendHighScores() fixed. | |
Diffstat: | |
M src/serverside.c | 5 ++++- | |
1 file changed, 4 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/src/serverside.c b/src/serverside.c | |
t@@ -2147,8 +2147,11 @@ void SendHighScores(Player *Play, gboolean EndGame, cha… | |
if (SendSingleHighScore(Play, &HiScore[i], j, InList == i)) | |
j++; | |
} | |
- if (InList == -1 && EndGame) | |
+ if (InList == -1 && EndGame) { | |
SendSingleHighScore(Play, &Score, j, TRUE); | |
+ g_free(Score.Name); | |
+ g_free(Score.Time); | |
+ } | |
SendServerMessage(NULL, C_NONE, C_ENDHISCORE, Play, | |
EndGame ? "end" : NULL); | |
if (!EndGame) |