From: leslie Date: Wed, 25 Jun 2008 12:12:51 +0000 (+0800) Subject: fix use of delete[] with new[] X-Git-Tag: 0.9.1~55 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=b76c96457717ca0c950ab16b38a010e2b4e4ac5d;p=sasc-ng.git fix use of delete[] with new[] --- 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)