wldap32: Missing HeapFree on error path (found by Smatch).

This commit is contained in:
Michael Stefaniuc 2007-02-13 00:02:34 +01:00 committed by Alexandre Julliard
parent 74950a9e1f
commit c6c68bf304
1 changed files with 3 additions and 0 deletions

View File

@ -114,7 +114,10 @@ static ULONG create_page_control( ULONG pagesize, struct WLDAP32_berval *cookie,
ctrl = HeapAlloc( GetProcessHeap(), 0, sizeof(LDAPControlW) );
if (!ctrl)
{
HeapFree( GetProcessHeap(), 0, val );
return WLDAP32_LDAP_NO_MEMORY;
}
ctrl->ldctl_oid = strAtoW( LDAP_PAGED_RESULT_OID_STRING );
ctrl->ldctl_value.bv_len = len;