]> git.sur5r.net Git - openldap/blobdiff - clients/ud/find.c
Fix format %x -> %lx in des_string_to_key
[openldap] / clients / ud / find.c
index 3a8b72efde53e3fbc231020305423e6db5930f2b..437c78fbff7b25f01719c91d28a4906960e982e1 100644 (file)
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+
+#include <ac/stdlib.h>
 
 #include <ac/ctype.h>
 #include <ac/string.h>
 #include <ac/time.h>
-extern char *strdup (const char *);
 
 #include <lber.h>
 #include <ldap.h>
@@ -224,7 +224,7 @@ find( char *who, int quiet )
                } else if (matches == 1) {
                        dn = ldap_get_dn(ld, ldap_first_entry(ld, res));
                        rc = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res);
-                       Free(dn);
+                       ldap_memfree(dn);
                        if (rc != LDAP_SUCCESS) {
                                int ld_errno = 0;
                                ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
@@ -292,7 +292,7 @@ find( char *who, int quiet )
                                fetch_buffer(response, sizeof(response), stdin);
                                if ((response[0] == 'n') || (response[0] == 'N'))
                                {
-                                       Free(dn);
+                                       ldap_memfree(dn);
                                        return(NULL);
                                }
                        }
@@ -315,7 +315,7 @@ find( char *who, int quiet )
                                ldap_msgfree(res);
                                res = NULL;
                        }
-                       Free(dn);
+                       ldap_memfree(dn);
                        return(res);
                }
                else if (matches > 0) {