mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
_libssh2_string_buf_free: use correct free (#304)
Use LIBSSH2_FREE() here, not free(). We allow memory function replacements so free() is rarely the right choice...
This commit is contained in:
committed by
Will Cosgrove
parent
3c1ff8a0b7
commit
3f927a8439
@@ -722,7 +722,7 @@ void _libssh2_string_buf_free(LIBSSH2_SESSION *session, struct string_buf *buf)
|
||||
return;
|
||||
|
||||
if(buf->data != NULL)
|
||||
free(buf->data);
|
||||
LIBSSH2_FREE(session, buf->data);
|
||||
|
||||
LIBSSH2_FREE(session, buf);
|
||||
buf = NULL;
|
||||
|
||||
Reference in New Issue
Block a user