fixed memory leaks, added cleanup code, added valgrind scripts to test binaries
This commit is contained in:
@@ -36,16 +36,16 @@ AQHOME_STORAGE *AqHomeStorage_new()
|
||||
void AqHomeStorage_free(AQHOME_STORAGE *aqh)
|
||||
{
|
||||
if (aqh) {
|
||||
AQH_Service_free(aqh->httpService);
|
||||
aqh->httpService=NULL;
|
||||
AQH_Storage_free(aqh->storage);
|
||||
GWEN_MsgEndpoint_free(aqh->rootEndpoint);
|
||||
GWEN_MsgEndpoint_free(aqh->rootEndpoint);
|
||||
GWEN_DB_Group_free(aqh->dbArgs);
|
||||
|
||||
aqh->storage=NULL;
|
||||
GWEN_MsgEndpoint_free(aqh->rootEndpoint);
|
||||
aqh->rootEndpoint=NULL;
|
||||
aqh->ipcdEndpoint=NULL;
|
||||
aqh->mqttEndpoint=NULL;
|
||||
aqh->httpdEndpoint=NULL;
|
||||
GWEN_DB_Group_free(aqh->dbArgs);
|
||||
aqh->dbArgs=NULL;
|
||||
free(aqh->pidFile);
|
||||
|
||||
@@ -114,6 +114,13 @@ void AqHomeStorage_SetPidFile(AQHOME_STORAGE *aqh, const char *s)
|
||||
|
||||
|
||||
|
||||
int AqHomeStorage_GetTimeout(const AQHOME_STORAGE *aqh)
|
||||
{
|
||||
return aqh?aqh->timeout:0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user