_gss_ntlm_init_sec_context() mem leaks
This commit is contained in:

committed by
Jeffrey Altman

parent
e87fca8091
commit
8dcd05ed4d
@@ -381,6 +381,7 @@ _gss_ntlm_init_sec_context
|
||||
if (RAND_bytes(nonce, sizeof(nonce)) != 1) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = EINVAL;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -399,6 +400,7 @@ _gss_ntlm_init_sec_context
|
||||
}
|
||||
if (ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,context_handle,NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -413,6 +415,7 @@ _gss_ntlm_init_sec_context
|
||||
if (type3.ntlm.data)
|
||||
free(type3.ntlm.data);
|
||||
_gss_ntlm_delete_sec_context(minor_status,context_handle,NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -426,6 +429,7 @@ _gss_ntlm_init_sec_context
|
||||
if (type3.ntlm.data)
|
||||
free(type3.ntlm.data);
|
||||
_gss_ntlm_delete_sec_context(minor_status,context_handle,NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -442,6 +446,7 @@ _gss_ntlm_init_sec_context
|
||||
if(ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_DEFECTIVE_TOKEN;
|
||||
}
|
||||
@@ -449,6 +454,7 @@ _gss_ntlm_init_sec_context
|
||||
if (ti.domainname && strcmp(ti.domainname, name->domain) != 0) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = EINVAL;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -464,6 +470,7 @@ _gss_ntlm_init_sec_context
|
||||
if (ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -475,6 +482,7 @@ _gss_ntlm_init_sec_context
|
||||
if (ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -487,6 +495,7 @@ _gss_ntlm_init_sec_context
|
||||
if (ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status,
|
||||
context_handle, NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -504,6 +513,7 @@ _gss_ntlm_init_sec_context
|
||||
free(type3.ntlm.data);
|
||||
if (ret) {
|
||||
_gss_ntlm_delete_sec_context(minor_status, context_handle, NULL);
|
||||
heim_ntlm_free_type2(&type2);
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
@@ -520,6 +530,7 @@ _gss_ntlm_init_sec_context
|
||||
|
||||
ctx->status |= STATUS_OPEN;
|
||||
|
||||
heim_ntlm_free_type2(&type2);
|
||||
return GSS_S_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user