diff options
Diffstat (limited to 'src/client/Client.cpp')
| -rw-r--r-- | src/client/Client.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 4c13850..577f78e 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -1594,16 +1594,19 @@ SaveInfo * Client::GetSave(int saveID, int saveDate) tempSave->Favourite = tempFavourite.Value(); tempSave->Views = tempViews.Value(); tempSave->Version = tempVersion.Value(); + free(data); return tempSave; } catch (json::Exception &e) { lastError = "Could not read response"; + free(data); return NULL; } } else { + if (data) free(data); lastError = http_ret_text(dataStatus); } return NULL; |
