Skip to content

Commit

Permalink
Fix potential memory leaks.
Browse files Browse the repository at this point in the history
(Merging pull request #234, amended by jacksonmj: some leaks already fixed in develop branch.)
  • Loading branch information
orbitcowboy authored and jacksonmj committed Dec 29, 2014
1 parent 93eb934 commit 34c85c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/GameSave.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 34c85c2

Please sign in to comment.