From c99bb09b56dc2db3b1bdcc78ad4c8c45d8a800b3 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sat, 3 Nov 2012 16:05:35 +0100 Subject: [PATCH] Software Update with apply the settings (Part8) - src/gui/ext_update.cpp: Use new instead of malloc Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/01d44a627219ab21deaa99ae1837c41fd692913a Author: Michael Liebmann Date: 2012-11-03 (Sat, 03 Nov 2012) Origin message was: ------------------ * Software Update with apply the settings (Part8) - src/gui/ext_update.cpp: Use new instead of malloc ------------------ This commit was generated by Migit --- src/gui/ext_update.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/ext_update.cpp b/src/gui/ext_update.cpp index d951bc5b8..6b6f911a8 100644 --- a/src/gui/ext_update.cpp +++ b/src/gui/ext_update.cpp @@ -63,7 +63,7 @@ CExtUpdate::CExtUpdate() mtdRamError = ""; mtdNumber = -1; MTDBufSize = 0xFFFF; - MTDBuf = (char*)malloc(MTDBufSize); + MTDBuf = new char[MTDBufSize]; backupList = CONFIGDIR "/settingsupdate.conf"; defaultBackup = CONFIGDIR; @@ -78,7 +78,7 @@ CExtUpdate::CExtUpdate() CExtUpdate::~CExtUpdate() { if (MTDBuf != NULL) - free(MTDBuf); + delete[] MTDBuf; if(FileHelpers) delete[] FileHelpers; }