diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-09-28 15:36:57 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-10-24 09:48:35 +0200 |
commit | 00cd5b1c831c9f4ce517e1fe35b42989ad4a0abd (patch) | |
tree | 04b25f9f73e8211aa287c7cedce53d764268f824 /include/libssh/libssh.h | |
parent | 9fbbdcc154eb787ed4dde6e7cc36d3c1d973e0eb (diff) | |
download | libssh-00cd5b1c831c9f4ce517e1fe35b42989ad4a0abd.tar.gz libssh-00cd5b1c831c9f4ce517e1fe35b42989ad4a0abd.tar.xz libssh-00cd5b1c831c9f4ce517e1fe35b42989ad4a0abd.zip |
messages: Add SSH_MESSAGE_FREE
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh/libssh.h')
-rw-r--r-- | include/libssh/libssh.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index f0ec9bf1..e30d4814 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -596,6 +596,8 @@ SSH_DEPRECATED LIBSSH_API void ssh_log(ssh_session session, LIBSSH_API ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg); LIBSSH_API int ssh_message_channel_request_reply_success(ssh_message msg); +#define SSH_MESSAGE_FREE(x) \ + do { if ((x) != NULL) { ssh_message_free(x); (x) = NULL; } } while(0) LIBSSH_API void ssh_message_free(ssh_message msg); LIBSSH_API ssh_message ssh_message_get(ssh_session session); LIBSSH_API int ssh_message_subtype(ssh_message msg); |