clear the passed in struct when the entry has been removed to help prevent

mistakes due to re-use
This commit is contained in:
Daniel Stenberg 2009-05-12 09:32:51 +00:00
parent 4490c6b434
commit 042b545247

View File

@ -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;
}