uu_server: Fix a few leaks

This commit is contained in:
Nicolas Williams
2022-01-31 18:15:26 -06:00
parent c3ea1ac37e
commit deb0c7f940

View File

@@ -102,6 +102,8 @@ proto (int sock, const char *service)
&in_creds, &out_creds);
if(status)
krb5_err(context, 1, status, "krb5_get_credentials");
krb5_cc_close(context, ccache);
ccache = NULL;
status = krb5_cc_default(context, &ccache);
if(status)
@@ -120,6 +122,8 @@ proto (int sock, const char *service)
NULL,
NULL,
NULL);
krb5_cc_close(context, ccache);
ccache = NULL;
if (status)
krb5_err(context, 1, status, "krb5_sendauth");
@@ -134,6 +138,9 @@ proto (int sock, const char *service)
free(str);
}
krb5_free_principal(context, in_creds.client);
krb5_free_principal(context, in_creds.server);
krb5_data_zero (&data);
krb5_data_zero (&packet);