From b76c96457717ca0c950ab16b38a010e2b4e4ac5d Mon Sep 17 00:00:00 2001 From: leslie Date: Wed, 25 Jun 2008 20:12:51 +0800 Subject: [PATCH] fix use of delete[] with new[] --- filter.c | 4 ++-- systems/sc-videoguard2/sc-videoguard2.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/filter.c b/filter.c index 9d6bd0b..0eb03d5 100644 --- a/filter.c +++ b/filter.c @@ -230,7 +230,7 @@ void cAction::Action(void) else { // first build pfd data Lock(); - delete pfd; pfd=new struct pollfd[filters.Count()]; + delete[] pfd; pfd=new struct pollfd[filters.Count()]; if(!pfd) { PRINTF(L_GEN_ERROR,"action %s: pollfd: out of memory",id); break; @@ -293,5 +293,5 @@ void cAction::Action(void) Unlock(); } } - delete pfd; + delete[] pfd; } diff --git a/systems/sc-videoguard2/sc-videoguard2.c b/systems/sc-videoguard2/sc-videoguard2.c index ea37485..9dcdc11 100644 --- a/systems/sc-videoguard2/sc-videoguard2.c +++ b/systems/sc-videoguard2/sc-videoguard2.c @@ -433,7 +433,7 @@ CmdTable::CmdTable(const unsigned char *mem, int size) CmdTable::~CmdTable() { - delete tab; + delete[] tab; } bool CmdTable::GetInfo(const unsigned char *cmd, unsigned char &rlen, unsigned char & rmode) -- 2.39.5