fix some memory lost
This commit is contained in:
parent
5b33531389
commit
1fb5a8c2fd
|
@ -249,6 +249,7 @@ static bool dnodeReadMnodeIpList() {
|
|||
|
||||
PARSE_OVER:
|
||||
free(content);
|
||||
cJSON_Delete(root);
|
||||
fclose(fp);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -167,6 +167,7 @@ void sdbCleanUp() {
|
|||
sem_destroy(&tsSdbSync->sem);
|
||||
pthread_mutex_destroy(&tsSdbSync->mutex);
|
||||
walClose(tsSdbSync->wal);
|
||||
free(tsSdbSync);
|
||||
tsSdbSync = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -576,5 +577,5 @@ void sdbCloseTable(void *handle) {
|
|||
pthread_mutex_destroy(&pTable->mutex);
|
||||
|
||||
sdbTrace("table:%s, is closed, numOfTables:%d", pTable->tableName, tsSdbNumOfTables);
|
||||
tfree(pTable);
|
||||
free(pTable);
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#define TG_PASS_URL_POS 3
|
||||
|
||||
void tgInitHandle(HttpServer *pServer);
|
||||
void tgCleanupHandle();
|
||||
|
||||
bool tgProcessRquest(struct HttpContext *pContext);
|
||||
|
||||
|
|
|
@ -122,12 +122,14 @@ void httpStopSystem() {
|
|||
if (httpServer != NULL) {
|
||||
httpServer->online = false;
|
||||
}
|
||||
tgCleanupHandle();
|
||||
}
|
||||
|
||||
void httpCleanUpSystem() {
|
||||
httpPrint("http service cleanup");
|
||||
httpStopSystem();
|
||||
#if 0
|
||||
|
||||
#if 1
|
||||
if (httpServer == NULL) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,7 @@ void tgFreeSchemas() {
|
|||
}
|
||||
free(tgSchemas.schemas);
|
||||
tgSchemas.size = 0;
|
||||
tgSchemas.schemas = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,6 +291,10 @@ void tgInitHandle(HttpServer *pServer) {
|
|||
httpAddMethod(pServer, &tgDecodeMethod);
|
||||
}
|
||||
|
||||
void tgCleanupHandle() {
|
||||
tgFreeSchemas();
|
||||
}
|
||||
|
||||
bool tgGetUserFromUrl(HttpContext *pContext) {
|
||||
HttpParser *pParser = &pContext->parser;
|
||||
if (pParser->path[TG_USER_URL_POS].len > TSDB_USER_LEN - 1 || pParser->path[TG_USER_URL_POS].len <= 0) {
|
||||
|
|
Loading…
Reference in New Issue