wldap32: Fix memory leak on error path in create_page_control (cppcheck).

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2021-12-20 22:06:08 -07:00 committed by Alexandre Julliard
parent 06923f61e2
commit 3f2458996c
1 changed files with 1 additions and 0 deletions

View File

@ -96,6 +96,7 @@ static ULONG create_page_control( ULONG pagesize, struct berval *cookie, UCHAR c
}
if (!(ctrl->ldctl_oid = strAtoW( LDAP_PAGED_RESULT_OID_STRING )))
{
free( val );
free( ctrl );
return LDAP_NO_MEMORY;
}