1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 05:13:38 +00:00

1. Updated encrypted discovery

2. Fixed memory leak
This commit is contained in:
Bryan Roe
2020-07-15 14:11:32 -07:00
parent 8737ba90e8
commit 7814278d4f
2 changed files with 30 additions and 14 deletions

View File

@@ -855,6 +855,7 @@ __EXPORT_TYPE int ILibSimpleDataStore_GetEx(ILibSimpleDataStore dataStore, char*
if (fread(compressed, 1, entry->valueLength, root->dataFile) == 0) return 0; // Read the value into the buffer
if (ILibInflate(compressed, entry->valueLength, buffer, &tmplen, 0) == 0)
{
ILibMemory_Free(compressed);
if (buffer == NULL) { return((int)tmplen); }
// Before we return, we need to check the HASH of the uncompressed data
@@ -870,6 +871,7 @@ __EXPORT_TYPE int ILibSimpleDataStore_GetEx(ILibSimpleDataStore dataStore, char*
}
else
{
ILibMemory_Free(compressed);
return(0);
}
}