1
0
Fork 0

DBG: fixed memory leaks

This commit is contained in:
Mr. eXoDia 2015-07-14 02:36:37 +02:00
parent a9cf745961
commit 1083a365d2
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@ void dbsave()
if(!hFile)
{
dputs("\nFailed to open database for writing!");
json_decref(root); //free root
return;
}
SetEndOfFile(hFile);
@ -46,6 +47,7 @@ void dbsave()
{
json_free(jsonText);
dputs("\nFailed to write database file!");
json_decref(root); //free root
return;
}
hFile.Close();