From 34c85c262c066b199cf6cf63f1178ee72746f880 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Tue, 23 Dec 2014 11:55:37 +0100 Subject: [PATCH] Fix potential memory leaks. (Merging pull request #234, amended by jacksonmj: some leaks already fixed in develop branch.) --- src/client/GameSave.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index fa6a95535..8144e540c 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -2170,7 +2170,7 @@ char * GameSave::serialiseOPS(int & dataLength) if (BZ2_bzBuffToBuffCompress((char*)(outputData+12), &outputDataLen, (char*)finalData, bson_size(&b), 9, 0, 0) != BZ_OK) { puts("Save Error\n"); - free(outputData); + delete [] outputData; dataLength = 0; outputData = NULL; goto fin;