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

Alexandre Julliard julliard at winehq.org
Tue Dec 21 15:16:32 CST 2021


Module: wine
Branch: master
Commit: 3f2458996c55b1e0ea8278015aa80450d459eada
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3f2458996c55b1e0ea8278015aa80450d459eada

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Mon Dec 20 22:06:08 2021 -0700

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

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wldap32/page.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/wldap32/page.c b/dlls/wldap32/page.c
index 8b0ded40e35..9f4acbdaa16 100644
--- a/dlls/wldap32/page.c
+++ b/dlls/wldap32/page.c
@@ -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;
     }




More information about the wine-cvs mailing list