mirror of
https://github.com/openssh/libopenssh
synced 2026-04-16 09:45:53 +00:00
sshbuf_free(NULL) should be a no-op
This commit is contained in:
@@ -87,6 +87,8 @@ sshbuf_free(struct sshbuf *buf)
|
||||
{
|
||||
int freeme;
|
||||
|
||||
if (buf == NULL)
|
||||
return;
|
||||
if (sshbuf_check_sanity(buf) == 0)
|
||||
bzero(buf->d, buf->alloc);
|
||||
free(buf->d);
|
||||
|
||||
Reference in New Issue
Block a user