diff options
author | Stef Walter <stefw@redhat.com> | 2015-11-10 12:18:30 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-05-02 15:29:01 +0200 |
commit | faca78f5472c644398c2fa49c01f357b8ddaafd0 (patch) | |
tree | 0625ea39f1476ca9b48e6c970c52f3222cabc187 /include/libssh | |
parent | 7da587ba6c4b5ef2d04998108a735943f7a6a0bb (diff) | |
download | libssh-faca78f5472c644398c2fa49c01f357b8ddaafd0.tar.gz libssh-faca78f5472c644398c2fa49c01f357b8ddaafd0.tar.xz libssh-faca78f5472c644398c2fa49c01f357b8ddaafd0.zip |
auth: Cleanup memory leak when using SSH agent
In Cockpit we've seen this memory leak:
at 0x4C2A9C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x5B76B03: ssh_userauth_agent (auth.c:778)
by 0x40DD5A: cockpit_ssh_authenticate (cockpitsshtransport.c:327)
BUG: https://red.libssh.org/issues/208
Signed-off-by: Stef Walter <stefw@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit ffe8b98cc2ee975c461322f0f119a398d783bdf7)
Diffstat (limited to 'include/libssh')
-rw-r--r-- | include/libssh/priv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h index b7a80fe2..9b34b247 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -361,5 +361,7 @@ int match_hostname(const char *host, const char *pattern, unsigned int len); #define CLOSE_SOCKET(s) do { if ((s) != SSH_INVALID_SOCKET) { _XCLOSESOCKET(s); (s) = SSH_INVALID_SOCKET;} } while(0) +void ssh_agent_state_free(void *data); + #endif /* _LIBSSH_PRIV_H */ /* vim: set ts=4 sw=4 et cindent: */ |