]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ufn.c
Update ld->ld_errno if LDAP_DECODING_ERROR...
[openldap] / libraries / libldap / ufn.c
index ff4e38dedcf9d8f2a9494e2134f1ac9eed0111f9..9d215cdec999aa45eb2333482374cbee70225c60 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 #include "portable.h"
 
 #include <stdio.h>
-#include <ac/string.h>
-#include <ctype.h>
-#include <stdlib.h>
 
+#include <ac/stdlib.h>
+
+#include <ac/ctype.h>
 #include <ac/socket.h>
+#include <ac/string.h>
 #include <ac/time.h>
 
 #include "ldap-int.h"
-#include "ldapconfig.h"
+#include "ldap_defaults.h"
 
 typedef int (*cancelptype) LDAP_P(( void *cancelparm ));
 
@@ -129,7 +131,7 @@ ldap_ufn_search_ctx( LDAP *ld, char **ufncomp, int ncomp, char *prefix,
                                    * 2 )) == NULL ) {
                                        return( ld->ld_errno = LDAP_NO_MEMORY );
                                }
-                               dns[0] = strdup( prefix );
+                               dns[0] = LDAP_STRDUP( prefix );
                                dns[1] = NULL;
                        } else {
                                dns = NULL;
@@ -476,7 +478,7 @@ ldap_ufn_setprefix( LDAP *ld, LDAP_CONST char *prefix )
        if ( ld->ld_ufnprefix != NULL )
                LDAP_FREE( ld->ld_ufnprefix );
 
-       ld->ld_ufnprefix = strdup( prefix );
+       ld->ld_ufnprefix = LDAP_STRDUP( prefix );
 }
 
 int