diff --git a/libraries/libldap/fetch.c b/libraries/libldap/fetch.c index 9e426dc647..536871bcfe 100644 --- a/libraries/libldap/fetch.c +++ b/libraries/libldap/fetch.c @@ -69,6 +69,8 @@ ldif_open_url( } p = ber_strdup( urlstr ); + if ( p == NULL ) + return NULL; /* But we should convert to LDAP_DIRSEP before use */ if ( LDAP_DIRSEP[0] != '/' ) {