fixed memory leaks, added cleanup code, added valgrind scripts to test binaries

This commit is contained in:
Martin Preuss
2023-08-09 17:24:44 +02:00
parent 4701a71986
commit b5916acf79
41 changed files with 991 additions and 170 deletions

View File

@@ -27,6 +27,8 @@
#define AQHOME_STORAGE_DEFAULT_STATEFILE "/var/lib/aqhomestorage/config/statefile"
#define AQHOME_STORAGE_DEFAULT_MAXSESSIONAGE (30*60)
#define AQHOME_STORAGE_SITEHEADER "site-header.html"
#define AQHOME_STORAGE_SITEFOOTER "site-footer.html"
@@ -35,9 +37,9 @@
struct AQHOME_STORAGE {
GWEN_MSG_ENDPOINT *rootEndpoint;
GWEN_MSG_ENDPOINT *ipcdEndpoint;
GWEN_MSG_ENDPOINT *mqttEndpoint;
GWEN_MSG_ENDPOINT *httpdEndpoint;
GWEN_MSG_ENDPOINT *ipcdEndpoint; /* don't release, will be released by freeing rootEndpoint! */
GWEN_MSG_ENDPOINT *mqttEndpoint; /* don't release, will be released by freeing rootEndpoint! */
GWEN_MSG_ENDPOINT *httpdEndpoint; /* don't release, will be released by freeing rootEndpoint! */
GWEN_DB_NODE *dbArgs;
@@ -45,6 +47,10 @@ struct AQHOME_STORAGE {
AQH_STORAGE *storage;
char *pidFile;
int maxSessionAgeInSeconds;
int timeout; /* timeout for run e.g. inside valgrind */
};
#endif