mirror of
https://github.com/sheumann/DiskBrowser.git
synced 2024-11-22 13:33:52 +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_value_free(json);
|
||||||
json = NULL;
|
json = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EndTCPConnection(&sess);
|
||||||
}
|
}
|
||||||
#pragma databank 0
|
#pragma databank 0
|
||||||
|
|
||||||
@ -228,6 +230,8 @@ void DoSearch(void) {
|
|||||||
sess.contentLength -= sess.readCount;
|
sess.contentLength -= sess.readCount;
|
||||||
*(netBuf + (sess.contentLength)) = 0;
|
*(netBuf + (sess.contentLength)) = 0;
|
||||||
|
|
||||||
|
if (json)
|
||||||
|
json_value_free(json);
|
||||||
json = json_parse(netBuf, sess.contentLength);
|
json = json_parse(netBuf, sess.contentLength);
|
||||||
if (json == NULL)
|
if (json == NULL)
|
||||||
goto errorReturn;
|
goto errorReturn;
|
||||||
@ -425,6 +429,8 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DoGoAway(void) {
|
void DoGoAway(void) {
|
||||||
|
CloseBrowserWindow();
|
||||||
|
|
||||||
ResourceShutDown();
|
ResourceShutDown();
|
||||||
|
|
||||||
/* TODO remove menu item, other cleanup? */
|
/* TODO remove menu item, other cleanup? */
|
||||||
|
Loading…
Reference in New Issue
Block a user