From c6c68bf304e4aa2ad66024fb6d64b8250ddb7341 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Tue, 13 Feb 2007 00:02:34 +0100 Subject: [PATCH] wldap32: Missing HeapFree on error path (found by Smatch). --- dlls/wldap32/page.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wldap32/page.c b/dlls/wldap32/page.c index cfea875cd71..cc1d0afb20c 100644 --- a/dlls/wldap32/page.c +++ b/dlls/wldap32/page.c @@ -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;