forked from weirdhome

Fork of HTTPClient by David Smart

Revision:
41:37e7df011c1f
Parent:
40:bcb19f8dbba3
Child:
42:ab259a9d1d36
--- a/data/HTTPiCal.cpp	Tue Mar 14 02:59:32 2017 +0000
+++ b/data/HTTPiCal.cpp	Sun Apr 16 20:55:07 2017 +0000
@@ -1,5 +1,11 @@
 #include "HTTPiCal.h"
 
+#include "Utility.h"            // private memory manager
+#ifndef UTILITY_H
+#define swMalloc malloc         // use the standard
+#define swFree free
+#endif
+
 //#define DEBUG "iCal"
 #include <cstdio>
 #if (defined(DEBUG) && !defined(TARGET_LPC11U24))
@@ -15,7 +21,7 @@
 #endif
 
 HTTPiCal::HTTPiCal(int count) {
-    EventList = (Event_T *)malloc(count * sizeof(Event_T));
+    EventList = (Event_T *)swMalloc(count * sizeof(Event_T));
     if (EventList) {
         EventSpaceCount = count;
         EventCount = 0;
@@ -27,7 +33,7 @@
 
 HTTPiCal::~HTTPiCal() {
     if (EventList)
-        free(EventList);
+        swFree(EventList);
 }
 
 void HTTPiCal::SetTimeWindow(time_t StartTime, time_t EndTime) {