mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
libsshpp: Initialize the string returned by getIssueBanner()
Fixes T13 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -335,11 +335,10 @@ public:
|
||||
* @see ssh_get_issue_banner
|
||||
*/
|
||||
std::string getIssueBanner(){
|
||||
char *banner=ssh_get_issue_banner(c_session);
|
||||
std::string ret;
|
||||
if (banner)
|
||||
{
|
||||
ret= std::string(banner);
|
||||
char *banner = ssh_get_issue_banner(c_session);
|
||||
std::string ret = "";
|
||||
if (banner != NULL) {
|
||||
ret = std::string(banner);
|
||||
::free(banner);
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user