From b943bf2c503baa79184d8088d28fa740b656db74 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 13 Oct 2007 12:07:27 +0200 Subject: [PATCH] Fixed a new[]/delete mismatch in cMenuEditStrItem::LeaveEditMode() --- CONTRIBUTORS | 1 + HISTORY | 2 ++ menuitems.c | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 82af3922..3b92a9f9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1530,6 +1530,7 @@ Udo Richter for fixing clearing color buttons in the 'curses' skin for adding a missing error report to cCuttingThread::Action() for reporting a problem in handling reallocated memory in cCharSetConv::Convert() + for fixing a new[]/delete mismatch in cMenuEditStrItem::LeaveEditMode() Sven Kreiensen for his help in keeping 'channels.conf.terr' up to date diff --git a/HISTORY b/HISTORY index 895764e4..fa0a29e5 100644 --- a/HISTORY +++ b/HISTORY @@ -5462,3 +5462,5 @@ Video Disk Recorder Revision History - Updated the Italian OSD texts (thanks to Diego Pierotto). - Fixed handling reallocated memory in cCharSetConv::Convert() (reported by Udo Richter). +- Fixed a new[]/delete mismatch in cMenuEditStrItem::LeaveEditMode() (thanks to + Udo Richter). diff --git a/menuitems.c b/menuitems.c index bcfef6ea..732aea25 100644 --- a/menuitems.c +++ b/menuitems.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.c 1.52 2007/10/13 10:39:40 kls Exp $ + * $Id: menuitems.c 1.53 2007/10/13 12:05:37 kls Exp $ */ #include "menuitems.h" @@ -302,11 +302,11 @@ void cMenuEditStrItem::LeaveEditMode(bool SaveValue) stripspace(value); } lengthUtf8 = 0; - delete valueUtf8; + delete[] valueUtf8; valueUtf8 = NULL; - delete allowedUtf8; + delete[] allowedUtf8; allowedUtf8 = NULL; - delete charMapUtf8; + delete[] charMapUtf8; charMapUtf8 = NULL; pos = -1; offset = 0;