diff options
Diffstat (limited to 'netrc.c')
-rw-r--r-- | netrc.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -310,6 +310,18 @@ search_netrc (list, host, login) return list; } +void +free_netrc(netrc_entry *a) { + while(a) { + netrc_entry *n = a->next; + memset(a->password, 0x55, strlen(a->password)); + xfree(a->password); + xfree(a->login); + xfree(a->host); + xfree(a); + a = n; + } +} #ifdef STANDALONE #include <sys/types.h> @@ -399,6 +411,8 @@ int main (int argc, char **argv) a = a->next; } + free_netrc(head); + exit (0); } #endif /* STANDALONE */ |