clear the passed in struct when the entry has been removed to help prevent
mistakes due to re-use
This commit is contained in:
parent
4490c6b434
commit
042b545247
@ -340,6 +340,9 @@ libssh2_knownhost_del(LIBSSH2_KNOWNHOSTS *hosts,
|
||||
/* free all resources */
|
||||
free_host(hosts->session, node);
|
||||
|
||||
/* clear the struct now since this host entry has been removed! */
|
||||
memset(entry, 0, sizeof(struct libssh2_knownhost));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user