]> www.vanbest.org Git - sasc-ng.git/commitdiff
fix use of delete[] with new[]
authorleslie <unknown>
Wed, 25 Jun 2008 12:12:51 +0000 (20:12 +0800)
committerleslie <unknown>
Wed, 25 Jun 2008 12:12:51 +0000 (20:12 +0800)
filter.c
systems/sc-videoguard2/sc-videoguard2.c

index 9d6bd0b30449fce6f1439289372769edc564656c..0eb03d560f309c1c70142830c6e8e04d6d3858f9 100644 (file)
--- 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;
 }
index ea37485768cf96e619bf8a9a5642032fa52e7927..9dcdc1132273df3bc8fb83018d428bc80f8c94a9 100644 (file)
@@ -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)