diff options
| author | cracker64 <cracker642@gmail.com> | 2013-03-10 03:47:08 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-03-10 03:47:08 (GMT) |
| commit | a9e66429d60c0867e540d645a8c52db79abb1736 (patch) | |
| tree | 45f2b3b48cfcf488c9f02b34a624f6a431a4ad43 /src/client/Client.cpp | |
| parent | 6090f0b0aaf302612f363cd3d85408e3b7d1150b (diff) | |
| download | powder-a9e66429d60c0867e540d645a8c52db79abb1736.zip powder-a9e66429d60c0867e540d645a8c52db79abb1736.tar.gz | |
Fix some memory issues when closing preview UI too fast.
I'm not sure if this pthread usage is ideal, but it does seem to work on linux.
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; |
