X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Furl.c;h=c5a4e0650c7f12181aaac0a97e7b315a5601533a;hb=8f4f94d4152185f2e445ec0929787095ff15f922;hp=249af5aa61f731c5ea24b698c32c1790c6cc8344;hpb=1bcec8bf6a17a65396b2c947faed846d20428db9;p=openldap diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index 249af5aa61..c5a4e0650c 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -24,7 +24,8 @@ #include "portable.h" #include -#include + +#include #include #include @@ -116,7 +117,7 @@ ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) } /* make working copy of the remainder of the URL */ - if (( url = strdup( url_tmp )) == NULL ) { + if (( url = LDAP_STRDUP( url_tmp )) == NULL ) { return( LDAP_URL_ERR_MEM ); } @@ -266,7 +267,7 @@ ldap_url_search( LDAP *ld, LDAP_CONST char *url, int attrsonly ) ludp->lud_filter, ludp->lud_attrs, attrsonly, NULL, NULL, -1, -1 ); - if ( ber == NULLBER ) { + if ( ber == NULL ) { return( -1 ); } @@ -274,7 +275,7 @@ ldap_url_search( LDAP *ld, LDAP_CONST char *url, int attrsonly ) if ( ludp->lud_host != NULL || ludp->lud_port != 0 ) { if (( srv = (LDAPServer *)LDAP_CALLOC( 1, sizeof( LDAPServer ))) - == NULL || ( srv->lsrv_host = strdup( ludp->lud_host == + == NULL || ( srv->lsrv_host = LDAP_STRDUP( ludp->lud_host == NULL ? ld->ld_defhost : ludp->lud_host )) == NULL ) { if ( srv != NULL ) { LDAP_FREE( srv );