summaryrefslogtreecommitdiff
path: root/mail/fetchmail/files/patch-netrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/fetchmail/files/patch-netrc.c')
-rw-r--r--mail/fetchmail/files/patch-netrc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mail/fetchmail/files/patch-netrc.c b/mail/fetchmail/files/patch-netrc.c
new file mode 100644
index 000000000000..fcd9bafc4f21
--- /dev/null
+++ b/mail/fetchmail/files/patch-netrc.c
@@ -0,0 +1,15 @@
+--- netrc.c (Revision 4683)
++++ netrc.c (Revision 4684)
+@@ -314,8 +314,10 @@
+ free_netrc(netrc_entry *a) {
+ while(a) {
+ netrc_entry *n = a->next;
+- memset(a->password, 0x55, strlen(a->password));
+- xfree(a->password);
++ if (a->password != NULL) {
++ memset(a->password, 0x55, strlen(a->password));
++ free(a->password);
++ }
+ xfree(a->login);
+ xfree(a->host);
+ xfree(a);