1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-21 14:00:51 +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:
Daniel Stenberg
2019-03-04 18:41:06 +01:00
committed by Will Cosgrove
parent 3c1ff8a0b7
commit 3f927a8439

View File

@@ -722,7 +722,7 @@ void _libssh2_string_buf_free(LIBSSH2_SESSION *session, struct string_buf *buf)
return; return;
if(buf->data != NULL) if(buf->data != NULL)
free(buf->data); LIBSSH2_FREE(session, buf->data);
LIBSSH2_FREE(session, buf); LIBSSH2_FREE(session, buf);
buf = NULL; buf = NULL;