(auth): free `app_data'

(sec_end): only destroy if it was initialized


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5044 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1998-06-30 16:06:07 +00:00
parent 2f088aa81c
commit 8b7eea88d8

View File

@@ -409,6 +409,7 @@ auth(char *auth_name)
return; return;
} }
} }
free (app_data);
reply(504, "%s is unknown to me", auth_name); reply(504, "%s is unknown to me", auth_name);
} }
@@ -713,12 +714,14 @@ sec_login(char *host)
void void
sec_end(void) sec_end(void)
{ {
if(mech->end) if (mech != NULL) {
(*mech->end)(app_data); if(mech->end)
(*mech->end)(app_data);
memset(app_data, 0, mech->size);
free(app_data);
}
sec_complete = 0; sec_complete = 0;
data_prot = 0; data_prot = 0;
memset(app_data, 0, mech->size);
free(app_data);
} }
#endif /* FTP_SERVER */ #endif /* FTP_SERVER */