瀏覽代碼

Memory leak

Source commit: 1f8d1d34cfbb5554e3d4ed4206047e42410b695c
Martin Prikryl 4 年之前
父節點
當前提交
63dccac950
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      source/core/PuttyIntf.cpp

+ 1 - 0
source/core/PuttyIntf.cpp

@@ -748,6 +748,7 @@ void FreeKey(TPrivateKey * PrivateKey)
 {
 {
   struct ssh2_userkey * Ssh2Key = reinterpret_cast<struct ssh2_userkey *>(PrivateKey);
   struct ssh2_userkey * Ssh2Key = reinterpret_cast<struct ssh2_userkey *>(PrivateKey);
   ssh_key_free(Ssh2Key->key);
   ssh_key_free(Ssh2Key->key);
+  sfree(Ssh2Key->comment);
   sfree(Ssh2Key);
   sfree(Ssh2Key);
 }
 }
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------