mirror of
https://github.com/sheumann/DiskBrowser.git
synced 2024-11-21 22:31:13 +00:00
Add some clean-up code.
This commit is contained in:
parent
990ea5fe97
commit
19b00980c9
@ -147,6 +147,8 @@ void CloseBrowserWindow(void) {
|
||||
json_value_free(json);
|
||||
json = NULL;
|
||||
}
|
||||
|
||||
EndTCPConnection(&sess);
|
||||
}
|
||||
#pragma databank 0
|
||||
|
||||
@ -228,6 +230,8 @@ void DoSearch(void) {
|
||||
sess.contentLength -= sess.readCount;
|
||||
*(netBuf + (sess.contentLength)) = 0;
|
||||
|
||||
if (json)
|
||||
json_value_free(json);
|
||||
json = json_parse(netBuf, sess.contentLength);
|
||||
if (json == NULL)
|
||||
goto errorReturn;
|
||||
@ -425,6 +429,8 @@ cleanup:
|
||||
}
|
||||
|
||||
void DoGoAway(void) {
|
||||
CloseBrowserWindow();
|
||||
|
||||
ResourceShutDown();
|
||||
|
||||
/* TODO remove menu item, other cleanup? */
|
||||
|
Loading…
Reference in New Issue
Block a user