[WLDAP32] Sync with Wine Staging 4.18. CORE-16441
[reactos.git] / dll / win32 / wldap32 / parse.c
index f7e93dd..e83e6d2 100644 (file)
  */
 
 #include "config.h"
-
 #include "wine/port.h"
-#include "wine/debug.h"
 
 #include <stdarg.h>
+#ifdef HAVE_LDAP_H
+#include <ldap.h>
+#endif
 
 #include "windef.h"
 #include "winbase.h"
 #include "winnls.h"
 
-#ifdef HAVE_LDAP_H
-#include <ldap.h>
-#endif
-
 #include "winldap_private.h"
 #include "wldap32.h"
+#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
 
@@ -260,7 +258,7 @@ ULONG CDECL ldap_parse_resultW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result,
 
     ldap_memfree( matchedU );
     ldap_memfree( errorU );
-    strarrayfreeU( referralsU );
+    ldap_memvfree( (void **)referralsU );
     ldap_controls_free( serverctrlsU );
 
 #endif
@@ -444,7 +442,7 @@ INT CDECL ldap_parse_vlv_controlW( WLDAP32_LDAP *ld, PLDAPControlW *control,
 
 #ifdef HAVE_LDAP_PARSE_VLV_CONTROL
     if (!(ret = ldap_parse_vlv_control( ld, controlU, &pos, &count,
-                                        context, errcode )))
+                                        (struct berval **)context, errcode )))
     {
         *targetpos = pos;
         *listcount = count;