uu_server: Fix a few leaks
This commit is contained in:
@@ -102,6 +102,8 @@ proto (int sock, const char *service)
|
|||||||
&in_creds, &out_creds);
|
&in_creds, &out_creds);
|
||||||
if(status)
|
if(status)
|
||||||
krb5_err(context, 1, status, "krb5_get_credentials");
|
krb5_err(context, 1, status, "krb5_get_credentials");
|
||||||
|
krb5_cc_close(context, ccache);
|
||||||
|
ccache = NULL;
|
||||||
|
|
||||||
status = krb5_cc_default(context, &ccache);
|
status = krb5_cc_default(context, &ccache);
|
||||||
if(status)
|
if(status)
|
||||||
@@ -120,6 +122,8 @@ proto (int sock, const char *service)
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
krb5_cc_close(context, ccache);
|
||||||
|
ccache = NULL;
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
krb5_err(context, 1, status, "krb5_sendauth");
|
krb5_err(context, 1, status, "krb5_sendauth");
|
||||||
@@ -134,6 +138,9 @@ proto (int sock, const char *service)
|
|||||||
free(str);
|
free(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
krb5_free_principal(context, in_creds.client);
|
||||||
|
krb5_free_principal(context, in_creds.server);
|
||||||
|
|
||||||
krb5_data_zero (&data);
|
krb5_data_zero (&data);
|
||||||
krb5_data_zero (&packet);
|
krb5_data_zero (&packet);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user