aboutsummaryrefslogtreecommitdiffstats
path: root/netrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'netrc.c')
-rw-r--r--netrc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/netrc.c b/netrc.c
index a56dfd7b..b95d134d 100644
--- a/netrc.c
+++ b/netrc.c
@@ -51,9 +51,10 @@ maybe_add_to_list (newentry, list)
if (a && ! a->account)
{
/* Free any allocated space. */
- free (a->host);
- free (a->account);
- free (a->password);
+ if (a->host)
+ free (a->host);
+ if (a->password)
+ free (a->password);
}
else
{