fixed memory leaks.

This commit is contained in:
Martin Preuss
2025-03-23 16:58:07 +01:00
parent ebce002614
commit 52eb92a00c
14 changed files with 292 additions and 7 deletions

View File

@@ -161,6 +161,7 @@ int main(int argc, char **argv)
AQH_ReactServer_Fini(aqh);
AQH_Object_free(aqh);
AQH_EventLoop_free(eventLoop);
GWEN_Gui_SetGui(NULL);
GWEN_Gui_free(gui);

View File

@@ -150,7 +150,13 @@ void GWENHYWFAR_CB _freeData(GWEN_UNUSED void *bp, void *p)
xo=(AQH_REACT_SERVER*) p;
AQH_Object_free(xo->brokerEndpoint);
GWEN_DB_Group_free(xo->dbArgs);
free(xo->pidFile);
free(xo->varsFile);
free(xo->brokerAddress);
free(xo->brokerClientId);
AQHREACT_Unit_List_free(xo->unitList);
AQH_Vars_free(xo->localVars);
GWEN_FREE_OBJECT(xo);
}

View File

@@ -46,6 +46,7 @@ void AQHREACT_Unit_free(AQHREACT_UNIT *unit)
GWEN_INHERIT_FINI(AQHREACT_UNIT, unit);
free(unit->typeName);
free(unit->description);
free(unit->id);
AQHREACT_Port_List_free(unit->outputPortList);
AQHREACT_Port_List_free(unit->inputPortList);
AQHREACT_Param_List_free(unit->paramList);

View File

@@ -246,8 +246,12 @@ int _hasDateChanged(AQHREACT_UNIT *unit)
GWEN_DATE *today;
today=GWEN_Date_CurrentDate();
if (GWEN_Date_Compare(today, xunit->date)!=0)
if (GWEN_Date_Compare(today, xunit->date)!=0) {
GWEN_Date_free(today);
return 1;
}
GWEN_Date_free(today);
}
}