Use the correct matching free operation. Patch by Matthieu Lochegnies.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4786 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx
index b5f361e..238f335 100644
--- a/common/rfb/Security.cxx
+++ b/common/rfb/Security.cxx
@@ -63,7 +63,7 @@
   secTypesStr = secTypes.getData();
   enabledSecTypes = parseSecTypes(secTypesStr);
 
-  delete secTypesStr;
+  delete [] secTypesStr;
 }
 
 const std::list<rdr::U8> Security::GetEnabledSecTypes(void)
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index 46dcd22..3e008ca 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -122,7 +122,7 @@
   if (desktop)
     delete desktop;
 
-  free(serverHost);
+  delete [] serverHost;
   if (sock)
     Fl::remove_fd(sock->getFd());
   delete sock;