[Chinese-commits] [fqterm] 05/16: Use delete [] for getString() generated arrays

Boyuan Yang hosiet-guest at moszumanska.debian.org
Sun Dec 18 15:36:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

hosiet-guest pushed a commit to branch master
in repository fqterm.

commit d10e6e6e607ed49b71a4629b74698975d3031f55
Author: Iru Cai <mytbk920423 at gmail.com>
Date:   Tue Nov 8 12:52:57 2016 +0800

    Use delete [] for getString() generated arrays
---
 src/protocol/internal/fqterm_ssh2_kex.cpp   | 4 ++--
 src/protocol/internal/fqterm_ssh_buffer.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/protocol/internal/fqterm_ssh2_kex.cpp b/src/protocol/internal/fqterm_ssh2_kex.cpp
index 8c6f240..3a8b75a 100644
--- a/src/protocol/internal/fqterm_ssh2_kex.cpp
+++ b/src/protocol/internal/fqterm_ssh2_kex.cpp
@@ -252,8 +252,8 @@ bool FQTermSSH2Kex::verifyKey() {
 
   RSA_free(rsactx);
 
-  delete K_S;
-  delete s;
+  delete [] K_S;
+  delete [] s;
 
   return res == 1;
 }
diff --git a/src/protocol/internal/fqterm_ssh_buffer.cpp b/src/protocol/internal/fqterm_ssh_buffer.cpp
index 1a44209..d307c78 100644
--- a/src/protocol/internal/fqterm_ssh_buffer.cpp
+++ b/src/protocol/internal/fqterm_ssh_buffer.cpp
@@ -195,7 +195,7 @@ void FQTermSSHBuffer::getSSH2BN(BIGNUM *bignum) {
 
   FQ_VERIFY(res != NULL);
 
-  delete hex_data;
+  delete [] hex_data;
 }
 
 u_short FQTermSSHBuffer::getWord() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/fqterm.git



More information about the Chinese-commits mailing list