From a2c79aa6dbbae83e6447f2bc610921d248980391 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Thu, 10 Aug 2023 13:27:51 +0200 Subject: [PATCH] Fixed memory leaks. --- apps/aqhome-storage/u_login.c | 1 + aqhome/data/storage_writexml.c | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/aqhome-storage/u_login.c b/apps/aqhome-storage/u_login.c index a179219..c4df910 100644 --- a/apps/aqhome-storage/u_login.c +++ b/apps/aqhome-storage/u_login.c @@ -307,6 +307,7 @@ AQH_SESSION *_generateSessionForUser(AQH_SERVICE *sv, AQH_USER *u) session=AQH_Session_new(); AQH_Session_SetUid(session, GWEN_Buffer_GetStart(buf)); + GWEN_Buffer_free(buf); ts=GWEN_Timestamp_NowInLocalTime(); AQH_Session_SetTimestampCreation(session, ts); diff --git a/aqhome/data/storage_writexml.c b/aqhome/data/storage_writexml.c index 8798ea3..af7528c 100644 --- a/aqhome/data/storage_writexml.c +++ b/aqhome/data/storage_writexml.c @@ -76,6 +76,7 @@ int AQH_Storage_WriteStateFile(const AQH_STORAGE *sto, const char *sFilename) GWEN_XMLNode_free(rootNode); return rv; } + GWEN_Buffer_free(nbuf); GWEN_XMLNode_free(rootNode); return 0; }