include: Add SSH_BUFFER_FREE

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 29b5477849)
This commit is contained in:
Andreas Schneider
2018-09-08 09:35:20 +02:00
parent 5bda3ab9f6
commit df83f4fb57

View File

@@ -795,6 +795,8 @@ LIBSSH_API const char* ssh_get_hmac_out(ssh_session session);
LIBSSH_API ssh_buffer ssh_buffer_new(void);
LIBSSH_API void ssh_buffer_free(ssh_buffer buffer);
#define SSH_BUFFER_FREE(x) \
do { if ((x) != NULL) { ssh_buffer_free(x); x = NULL; } } while(0)
LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer);
LIBSSH_API int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len);
LIBSSH_API uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen);