Permalink
Browse files

Fix potential memory leaks.

(Merging pull request #234, amended by jacksonmj: some leaks already fixed in develop branch.)
  • Loading branch information...
orbitcowboy authored and jacksonmj committed Dec 23, 2014
1 parent 93eb934 commit 34c85c262c066b199cf6cf63f1178ee72746f880
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;

0 comments on commit 34c85c2

Please sign in to comment.