CESNET / libnetconf

C NETCONF library
Other
113 stars 83 forks source link

Fix memory leaks in a few error branches, found by cppcheck. #278

Closed adamjrichter closed 5 years ago

adamjrichter commented 5 years ago

This patch attempts to fix minor memory leaks in the following functions, found by cppcheck:

src/callbacks.c: callbacksshauth{password,publickey}_default src/ssh.c: nc_session_connect_libssh_channel src/transport.c: _nc_session_accept

Although I have inspected the changes visually, built with change and confirmed that I did not see any compiler warnings related to the changes, I have not attempted to run the code and may not be able to respond to feedback about this pull request for the rest of the day, but I will attempt to respond if anyone has any questions. Thanks for considering this submission.