aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/auth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/auth.c b/src/auth.c
index b5f687a..e89c0d0 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -258,6 +258,9 @@ struct authinfo_t auth_check(const char *name2, const char *pass2)
if(getline(&line, &len, f) < 0)
{
free(line);
+ free(name);
+ memset(pass, 0, strlen(pass));
+ free(pass);
goto bad;
}
if(!strcmp(strtok(line, ":\r\n"), name))
@@ -299,6 +302,8 @@ struct authinfo_t auth_check(const char *name2, const char *pass2)
goto bad;
}
}
+ else
+ free(line);
}
good:
printf("Successful authentication.\n");