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